From 8727284a4b211556f59d700c41fa40ec33a78cd2 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 20 Mar 2018 14:38:40 -0500 Subject: [PATCH] haskell: only use glibcLocales when using glibc Fixes eval w/musl. Possible alternative would be using glibcLocales when it is non-null, to avoid duplicating the logic. --- pkgs/development/haskell-modules/generic-builder.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 1a788ae642e..0f948f42f25 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -386,7 +386,7 @@ stdenv.mkDerivation ({ buildInputs = systemBuildInputs; nativeBuildInputs = [ ghcEnv ] ++ nativeBuildInputs; LANG = "en_US.UTF-8"; - LOCALE_ARCHIVE = optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive"; + LOCALE_ARCHIVE = optionalString (stdenv.hostPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive"; shellHook = '' export NIX_${ghcCommandCaps}="${ghcEnv}/bin/${ghcCommand}" export NIX_${ghcCommandCaps}PKG="${ghcEnv}/bin/${ghcCommand}-pkg" @@ -430,5 +430,5 @@ stdenv.mkDerivation ({ // optionalAttrs (postFixup != "") { inherit postFixup; } // optionalAttrs (dontStrip) { inherit dontStrip; } // optionalAttrs (hardeningDisable != []) { inherit hardeningDisable; } -// optionalAttrs (buildPlatform.isLinux){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } +// optionalAttrs (buildPlatform.libc == "glibc"){ LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive"; } )