mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 23:03:40 +01:00
Merge pull request #41932 from obsidiansystems/fix-setup-depends
haskell generic-builder: Use separate setup db in more cases
This commit is contained in:
commit
b2a76b6464
1 changed files with 5 additions and 3 deletions
|
@ -166,9 +166,11 @@ let
|
||||||
"--configure-option=--host=${hostPlatform.config}"
|
"--configure-option=--host=${hostPlatform.config}"
|
||||||
] ++ crossCabalFlags);
|
] ++ crossCabalFlags);
|
||||||
|
|
||||||
|
useSeparateSetupDb = setupHaskellDepends != [] || isCross || isGhcjs;
|
||||||
|
|
||||||
setupCompileFlags = [
|
setupCompileFlags = [
|
||||||
(optionalString (!coreSetup) "-${nativePackageDbFlag}=${
|
(optionalString (!coreSetup) "-${nativePackageDbFlag}=${
|
||||||
if setupHaskellDepends != []
|
if useSeparateSetupDb
|
||||||
then "$setupPackageConfDir"
|
then "$setupPackageConfDir"
|
||||||
else "$packageConfDir"
|
else "$packageConfDir"
|
||||||
}")
|
}")
|
||||||
|
@ -268,7 +270,7 @@ stdenv.mkDerivation ({
|
||||||
echo "Build with ${ghc}."
|
echo "Build with ${ghc}."
|
||||||
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
|
${optionalString (hasActiveLibrary && hyperlinkSource) "export PATH=${hscolour}/bin:$PATH"}
|
||||||
|
|
||||||
'' + (optionalString (setupHaskellDepends != []) ''
|
'' + (optionalString useSeparateSetupDb ''
|
||||||
setupPackageConfDir="$TMPDIR/setup-package.conf.d"
|
setupPackageConfDir="$TMPDIR/setup-package.conf.d"
|
||||||
mkdir -p $setupPackageConfDir
|
mkdir -p $setupPackageConfDir
|
||||||
'') + ''
|
'') + ''
|
||||||
|
@ -282,7 +284,7 @@ stdenv.mkDerivation ({
|
||||||
# dependencies for the build machine.
|
# dependencies for the build machine.
|
||||||
#
|
#
|
||||||
# pkgs* arrays defined in stdenv/setup.hs
|
# pkgs* arrays defined in stdenv/setup.hs
|
||||||
+ (optionalString (setupHaskellDepends != []) ''
|
+ (optionalString useSeparateSetupDb ''
|
||||||
for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do
|
for p in "''${pkgsBuildBuild[@]}" "''${pkgsBuildHost[@]}" "''${pkgsBuildTarget[@]}"; do
|
||||||
${buildPkgDb nativeGhc.name "$setupPackageConfDir"}
|
${buildPkgDb nativeGhc.name "$setupPackageConfDir"}
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue