Merge pull request #161961 from hercules-ci/callCabal2nix-no-cc
callCabal2nix: Use stdenvNoCC
This commit is contained in:
commit
b8b491504b
1 changed files with 6 additions and 9 deletions
|
@ -124,20 +124,17 @@ let
|
||||||
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
|
haskellSrc2nix = { name, src, sha256 ? null, extraCabal2nixOptions ? "" }:
|
||||||
let
|
let
|
||||||
sha256Arg = if sha256 == null then "--sha256=" else ''--sha256="${sha256}"'';
|
sha256Arg = if sha256 == null then "--sha256=" else ''--sha256="${sha256}"'';
|
||||||
in buildPackages.stdenv.mkDerivation {
|
in buildPackages.runCommand "cabal2nix-${name}" {
|
||||||
name = "cabal2nix-${name}";
|
|
||||||
nativeBuildInputs = [ buildPackages.cabal2nix-unwrapped ];
|
nativeBuildInputs = [ buildPackages.cabal2nix-unwrapped ];
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
allowSubstitutes = false;
|
allowSubstitutes = false;
|
||||||
phases = ["installPhase"];
|
|
||||||
LANG = "en_US.UTF-8";
|
LANG = "en_US.UTF-8";
|
||||||
LOCALE_ARCHIVE = pkgs.lib.optionalString (buildPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
|
LOCALE_ARCHIVE = pkgs.lib.optionalString (buildPlatform.libc == "glibc") "${buildPackages.glibcLocales}/lib/locale/locale-archive";
|
||||||
installPhase = ''
|
} ''
|
||||||
export HOME="$TMP"
|
export HOME="$TMP"
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cabal2nix --compiler=${self.ghc.haskellCompilerName} --system=${hostPlatform.config} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
|
cabal2nix --compiler=${self.ghc.haskellCompilerName} --system=${hostPlatform.config} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
all-cabal-hashes-component = name: version: buildPackages.runCommand "all-cabal-hashes-component-${name}-${version}" {} ''
|
all-cabal-hashes-component = name: version: buildPackages.runCommand "all-cabal-hashes-component-${name}-${version}" {} ''
|
||||||
tar --wildcards -xzvf ${all-cabal-hashes} \*/${name}/${version}/${name}.{json,cabal}
|
tar --wildcards -xzvf ${all-cabal-hashes} \*/${name}/${version}/${name}.{json,cabal}
|
||||||
|
|
Loading…
Reference in a new issue