Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions pkgs/development/ocaml-modules/jsont/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
lib,
fetchzip,
topkg,
buildTopkgPackage,
withBrr ? true,
brr,
withBytesrw ? true,
bytesrw,
withCmdliner ? true,
cmdliner,
}:

Expand All @@ -18,17 +22,22 @@ buildTopkgPackage rec {
hash = "sha256-dXHl+bLuIrlrQ5Np37+uVuETFBb3j8XeDVEK9izoQFk=";
};

# docs say these dependendencies are optional, but buildTopkgPackage doesn’t
# handle missing dependencies
buildInputs = lib.optional withCmdliner cmdliner;

buildInputs = [
cmdliner
];
propagatedBuildInputs = lib.optional withBrr brr ++ lib.optional withBytesrw bytesrw;

propagatedBuildInputs = [
brr
bytesrw
];
buildPhase = "${topkg.run} build ${
lib.escapeShellArgs [
"--with-brr"
(lib.boolToString withBrr)

"--with-bytesrw"
(lib.boolToString withBytesrw)

"--with-cmdliner"
(lib.boolToString withCmdliner)
]
}";

meta = {
description = "Declarative JSON data manipulation";
Expand Down
Loading