summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorGleb Peregud <gleber.p@gmail.com>2017-10-03 19:01:47 +0200
committerGleb Peregud <gleber.p@gmail.com>2017-10-04 23:23:57 +0200
commit558db539f5bd67b58a5e6695319fb07f90c473de (patch)
treef8c71263560384486202cce6198ff9b9cafcd4bf /pkgs/development/interpreters
parentb465d9c1fff4e92d6790e10dafc6a578c44ac98e (diff)
downloadnixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar.gz
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar.bz2
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar.lz
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar.xz
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.tar.zst
nixlib-558db539f5bd67b58a5e6695319fb07f90c473de.zip
elixir: Fix locale problem on NixOS
It looks like Erlang/OTP requires access to LOCALE_ARCHIVE for locales to correctly work. Elixir depends on this here:
https://github.com/elixir-lang/elixir/blob/7a556b8f26f42f6b7510dc1d2351564d91ab746c/lib/elixir/src/elixir.erl#L76

Fixes #30047
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/elixir/generic-builder.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/development/interpreters/elixir/generic-builder.nix b/pkgs/development/interpreters/elixir/generic-builder.nix
index 8f83a338484c..78598ce3d81e 100644
--- a/pkgs/development/interpreters/elixir/generic-builder.nix
+++ b/pkgs/development/interpreters/elixir/generic-builder.nix
@@ -22,6 +22,8 @@ in
 
     buildInputs = [ erlang rebar makeWrapper ];
 
+    LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux
+      "${pkgs.glibcLocales}/lib/locale/locale-archive";
     LANG = "en_US.UTF-8";
     LC_TYPE = "en_US.UTF-8";
 
@@ -30,8 +32,8 @@ in
     inherit debugInfo;
 
     buildFlags = if debugInfo
-     then "ERL_COMPILER_OPTIONS=debug_info"
-     else "";
+      then "ERL_COMPILER_OPTIONS=debug_info"
+      else "";
 
     preBuild = ''
       # The build process uses ./rebar. Link it to the nixpkgs rebar