ocamlPackages.jsont: flags to turn off optional dependencies
This commit is contained in:
parent
327e83ae65
commit
22ae0b20d0
@ -1,9 +1,13 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
topkg,
|
||||||
buildTopkgPackage,
|
buildTopkgPackage,
|
||||||
|
withBrr ? true,
|
||||||
brr,
|
brr,
|
||||||
|
withBytesrw ? true,
|
||||||
bytesrw,
|
bytesrw,
|
||||||
|
withCmdliner ? true,
|
||||||
cmdliner,
|
cmdliner,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -18,17 +22,22 @@ buildTopkgPackage rec {
|
|||||||
hash = "sha256-dXHl+bLuIrlrQ5Np37+uVuETFBb3j8XeDVEK9izoQFk=";
|
hash = "sha256-dXHl+bLuIrlrQ5Np37+uVuETFBb3j8XeDVEK9izoQFk=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# docs say these dependendencies are optional, but buildTopkgPackage doesn’t
|
buildInputs = lib.optional withCmdliner cmdliner;
|
||||||
# handle missing dependencies
|
|
||||||
|
|
||||||
buildInputs = [
|
propagatedBuildInputs = lib.optional withBrr brr ++ lib.optional withBytesrw bytesrw;
|
||||||
cmdliner
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
buildPhase = "${topkg.run} build ${
|
||||||
brr
|
lib.escapeShellArgs [
|
||||||
bytesrw
|
"--with-brr"
|
||||||
];
|
(lib.boolToString withBrr)
|
||||||
|
|
||||||
|
"--with-bytesrw"
|
||||||
|
(lib.boolToString withBytesrw)
|
||||||
|
|
||||||
|
"--with-cmdliner"
|
||||||
|
(lib.boolToString withCmdliner)
|
||||||
|
]
|
||||||
|
}";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Declarative JSON data manipulation";
|
description = "Declarative JSON data manipulation";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user