Merge pull request #41641 from obsidiansystems/haskell-infra-latebind

haskell infra: Use `self.ghc` rather than closing over initial value
This commit is contained in:
John Ericson 2018-06-07 14:58:10 -04:00 committed by GitHub
commit 23f2dfd9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,8 +102,7 @@ let
callPackage = drv: args: callPackageWithScope defaultScope drv args; callPackage = drv: args: callPackageWithScope defaultScope drv args;
withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix { withPackages = packages: buildPackages.callPackage ./with-packages-wrapper.nix {
inherit (self) llvmPackages; inherit (self) ghc llvmPackages;
inherit ghc;
inherit packages; inherit packages;
}; };
@ -120,7 +119,7 @@ let
installPhase = '' installPhase = ''
export HOME="$TMP" export HOME="$TMP"
mkdir -p "$out" mkdir -p "$out"
cabal2nix --compiler=${ghc.haskellCompilerName} --system=${hostPlatform.system} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix" cabal2nix --compiler=${self.ghc.haskellCompilerName} --system=${hostPlatform.system} ${sha256Arg} "${src}" ${extraCabal2nixOptions} > "$out/default.nix"
''; '';
}; };