lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ocamlPackages.jsont: flags to turn off optional dependencies

authored by

·𐑑𐑴𐑕𐑑𐑩𐑤 and committed by
Vincent Laporte
22ae0b20 327e83ae

+18 -9
+18 -9
pkgs/development/ocaml-modules/jsont/default.nix
··· 1 1 { 2 2 lib, 3 3 fetchzip, 4 + topkg, 4 5 buildTopkgPackage, 6 + withBrr ? true, 5 7 brr, 8 + withBytesrw ? true, 6 9 bytesrw, 10 + withCmdliner ? true, 7 11 cmdliner, 8 12 }: 9 13 ··· 18 22 hash = "sha256-dXHl+bLuIrlrQ5Np37+uVuETFBb3j8XeDVEK9izoQFk="; 19 23 }; 20 24 21 - # docs say these dependendencies are optional, but buildTopkgPackage doesn’t 22 - # handle missing dependencies 25 + buildInputs = lib.optional withCmdliner cmdliner; 26 + 27 + propagatedBuildInputs = lib.optional withBrr brr ++ lib.optional withBytesrw bytesrw; 28 + 29 + buildPhase = "${topkg.run} build ${ 30 + lib.escapeShellArgs [ 31 + "--with-brr" 32 + (lib.boolToString withBrr) 23 33 24 - buildInputs = [ 25 - cmdliner 26 - ]; 34 + "--with-bytesrw" 35 + (lib.boolToString withBytesrw) 27 36 28 - propagatedBuildInputs = [ 29 - brr 30 - bytesrw 31 - ]; 37 + "--with-cmdliner" 38 + (lib.boolToString withCmdliner) 39 + ] 40 + }"; 32 41 33 42 meta = { 34 43 description = "Declarative JSON data manipulation";