forked from mirrors/nixpkgs
haskell-generic-builder: improve recognition of pkgconfig dependencies
This commit is contained in:
parent
e4d493fc54
commit
ab77228749
|
@ -45,7 +45,6 @@
|
||||||
, useCpphs ? false
|
, useCpphs ? false
|
||||||
} @ args:
|
} @ args:
|
||||||
|
|
||||||
assert pkgconfigDepends != [] -> pkgconfig != null;
|
|
||||||
assert editedCabalFile != null -> revision != null;
|
assert editedCabalFile != null -> revision != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
@ -105,10 +104,13 @@ let
|
||||||
isHaskellPkg = x: (x ? pname) && (x ? version) && (x ? env);
|
isHaskellPkg = x: (x ? pname) && (x ? version) && (x ? env);
|
||||||
isSystemPkg = x: !isHaskellPkg x;
|
isSystemPkg = x: !isHaskellPkg x;
|
||||||
|
|
||||||
|
allPkgconfigDepends = pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends ++
|
||||||
|
optionals doCheck testPkgconfigDepends;
|
||||||
|
|
||||||
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
|
propagatedBuildInputs = buildDepends ++ libraryHaskellDepends ++ executableHaskellDepends;
|
||||||
otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
|
otherBuildInputs = extraLibraries ++ librarySystemDepends ++ executableSystemDepends ++
|
||||||
buildTools ++ libraryToolDepends ++ executableToolDepends ++
|
buildTools ++ libraryToolDepends ++ executableToolDepends ++
|
||||||
optionals (pkgconfigDepends != []) ([pkgconfig] ++ pkgconfigDepends ++ libraryPkgconfigDepends ++ executablePkgconfigDepends) ++
|
optionals (allPkgconfigDepends != []) ([pkgconfig] ++ allPkgconfigDepends) ++
|
||||||
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends);
|
optionals doCheck (testDepends ++ testHaskellDepends ++ testSystemDepends);
|
||||||
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
|
allBuildInputs = propagatedBuildInputs ++ otherBuildInputs;
|
||||||
|
|
||||||
|
@ -122,6 +124,9 @@ let
|
||||||
ghcCommandCaps = toUpper ghcCommand;
|
ghcCommandCaps = toUpper ghcCommand;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
|
assert allPkgconfigDepends != [] -> pkgconfig != null;
|
||||||
|
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
name = "${optionalString (hasActiveLibrary && pname != "ghcjs") "haskell-"}${pname}-${version}";
|
name = "${optionalString (hasActiveLibrary && pname != "ghcjs") "haskell-"}${pname}-${version}";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue