haskell generic builder: setupHaskellDepends
should be `nativeBuildInputs
This is because they are just for Setup.hs, so they are just used at build time and completely isolated from the normal components' dependencies. This was previous implemented in8a8f0408cd
, but reverted ine69c7f5641
because it broken setup-depends non-cross in haskell shell environments (custom Setup.hs in cross shell environments has never worked). This version adds a special native exception to avoid that breakage.
This commit is contained in:
parent
c6f742b770
commit
900862ea3b
1 changed files with 6 additions and 2 deletions
|
@ -169,18 +169,22 @@ let
|
||||||
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
|
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
|
||||||
|
|
||||||
nativeBuildInputs = [ ghc nativeGhc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) pkgconfig ++
|
nativeBuildInputs = [ ghc nativeGhc removeReferencesTo ] ++ optional (allPkgconfigDepends != []) pkgconfig ++
|
||||||
|
setupHaskellDepends ++
|
||||||
buildTools ++ libraryToolDepends ++ executableToolDepends;
|
buildTools ++ libraryToolDepends ++ executableToolDepends;
|
||||||
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
|
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
|
||||||
otherBuildInputs = setupHaskellDepends ++ extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
|
otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
|
||||||
optionals (allPkgconfigDepends != []) allPkgconfigDepends ++
|
optionals (allPkgconfigDepends != []) allPkgconfigDepends ++
|
||||||
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++
|
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testToolDepends) ++
|
||||||
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkToolDepends);
|
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkToolDepends);
|
||||||
|
|
||||||
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
|
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
|
||||||
|
|
||||||
haskellBuildInputs = stdenv.lib.filter isHaskellPkg allBuildInputs;
|
haskellBuildInputs = stdenv.lib.filter isHaskellPkg allBuildInputs;
|
||||||
systemBuildInputs = stdenv.lib.filter isSystemPkg allBuildInputs;
|
systemBuildInputs = stdenv.lib.filter isSystemPkg allBuildInputs;
|
||||||
|
|
||||||
ghcEnv = ghc.withPackages (p: haskellBuildInputs);
|
# When not cross compiling, also include Setup.hs dependencies.
|
||||||
|
ghcEnv = ghc.withPackages (p:
|
||||||
|
haskellBuildInputs ++ stdenv.lib.optional (!isCross) setupHaskellDepends);
|
||||||
|
|
||||||
setupCommand = "./Setup";
|
setupCommand = "./Setup";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue