beam: fix locale errors on darwin

C.UTF-8 is non-standard and generates errors such as:

bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8): Bad file descriptor
This commit is contained in:
Adam C. Stephens
2025-03-01 17:53:23 -05:00
parent 2b0c931ffc
commit a293bbb210
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -57,7 +57,8 @@ let
in
"[${lib.concatStringsSep "," options}]";
LC_ALL = "C.UTF-8";
LANG = if stdenv.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
# add to ERL_LIBS so other modules can find at runtime.
# http://erlang.org/doc/man/code.html#code-path
@@ -134,7 +134,8 @@ stdenv.mkDerivation (
in
"[${lib.concatStringsSep "," options}]";
LC_ALL = "C.UTF-8";
LANG = if stdenv.isLinux then "C.UTF-8" else "C";
LC_CTYPE = if stdenv.isLinux then "C.UTF-8" else "UTF-8";
postUnpack =
''