haskell.lib.getBuildInputs: Use generic builder passthru to implement
This commit is contained in:
committed by
Peter Simons
parent
1951aea6a5
commit
7c5c3fceff
@@ -174,8 +174,7 @@ let
|
||||
(optionalString (versionOlder "7.10" ghc.version && !isHaLVM) "-threaded")
|
||||
];
|
||||
|
||||
isHaskellPkg = x: (x ? pname) && (x ? version) && (x ? env);
|
||||
isSystemPkg = x: !isHaskellPkg x;
|
||||
isHaskellPkg = x: x ? isHaskellLibrary;
|
||||
|
||||
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
|
||||
optionals doCheck testPkgconfigDepends ++ optionals doBenchmark benchmarkPkgconfigDepends;
|
||||
@@ -192,7 +191,10 @@ let
|
||||
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends ++ testFrameworkDepends) ++
|
||||
optionals doBenchmark (benchmarkDepends ++ benchmarkHaskellDepends ++ benchmarkSystemDepends ++ benchmarkFrameworkDepends);
|
||||
|
||||
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
|
||||
|
||||
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs ++ depsBuildBuild;
|
||||
isHaskellPartition =
|
||||
stdenv.lib.partition isHaskellPkg allBuildInputs;
|
||||
|
||||
haskellBuildInputs = stdenv.lib.filter isHaskellPkg allBuildInputs;
|
||||
systemBuildInputs = stdenv.lib.filter isSystemPkg allBuildInputs;
|
||||
@@ -429,6 +431,13 @@ stdenv.mkDerivation ({
|
||||
|
||||
compiler = ghc;
|
||||
|
||||
|
||||
getBuildInputs = {
|
||||
inherit propagatedBuildInputs otherBuildInputs allPkgconfigDepends;
|
||||
haskellBuildInputs = isHaskellPartition.right;
|
||||
systemBuildInputs = isHaskellPartition.wrong;
|
||||
};
|
||||
|
||||
isHaskellLibrary = isLibrary;
|
||||
|
||||
# TODO: ask why the split outputs are configurable at all?
|
||||
|
||||
Reference in New Issue
Block a user