buildLocalCabal: do not set LANG/LOCALE_ARCHIVE on non-linux machines

This commit is contained in:
Vladimir Kirillov 2014-03-30 14:46:28 +08:00
parent 9186f0b5dd
commit bad9de86b6

View file

@ -2903,13 +2903,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
# Build a cabal package given a local .cabal file
buildLocalCabal = src: name: let
cabalExpr = pkgs.stdenv.mkDerivation {
cabalExpr = pkgs.stdenv.mkDerivation ({
name = "${name}.nix";
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
buildCommand = ''
${self.cabal2nix}/bin/cabal2nix ${src + "/${name}.cabal"} --sha256=FILTERME \
| grep -v FILTERME | sed \
@ -2917,7 +2913,11 @@ let result = let callPackage = x : y : modifyPrio (newScope result.finalReturn x
-e 's/{ cabal/{ cabal, src/' \
-e 's/pname = \([^\n]*\)/pname = \1\n inherit src;\n jailbreak = true;/' > $out
'';
};
} // pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
});
in callPackage cabalExpr { inherit src; };
cabalDev = callPackage ../development/tools/haskell/cabal-dev {};