mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-10 16:45:51 +03:00
buildLocalCabal: do not set LANG/LOCALE_ARCHIVE on non-linux machines
This commit is contained in:
parent
9186f0b5dd
commit
bad9de86b6
@ -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 {};
|
||||
|
Loading…
Reference in New Issue
Block a user