From 3037733bbda2ac163004b963aa761bb6775b2f36 Mon Sep 17 00:00:00 2001 From: Josh Heinrichs Date: Thu, 14 May 2026 16:18:47 -0600 Subject: [PATCH] Set LANG for ruby 4.0.4+ support This is adapted from the ruby 4.0.4 bump in nixpkgs which also sets LANG[1] because some non-US-ASCII characters were added that RDoc fails to parse otherwise. [1] https://github.com/NixOS/nixpkgs/pull/519212 --- ruby/package-fn.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby/package-fn.nix b/ruby/package-fn.nix index 9f07b8c..4bbf119 100644 --- a/ruby/package-fn.nix +++ b/ruby/package-fn.nix @@ -67,6 +67,12 @@ let # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds. NROFF = if docSupport then "${groff}/bin/nroff" else null; + LANG = + if docSupport && (with versionComparison version; hasPrefix "4.0") then + "C.UTF-8" + else + null; + nativeBuildInputs = [ bison ] ++ ops (stdenv.buildPlatform != stdenv.hostPlatform) [ buildPackages.ruby ];