git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.yojson: 1.3.3 -> 1.4.0
commitd0c513b470d7561d2038d2a46340a78cc9a21103 authorVincent Laporte <Vincent.Laporte@gmail.com> dateSun 22 Oct 2017, 06:29 (9 years ago) parenta8da423
1 file changed+17−15
pkgs/development/ocaml-modules/yojson/default.nix+17−15
pkgs/development/ocaml-modules/yojson/default.nix+17−15
@@ -1,16 +1,26 @@
1−{ stdenv, fetchzip, ocaml, findlib, cppo, easy-format, biniou }:
1+{ stdenv, fetchzip, ocaml, findlib, jbuilder, cppo, easy-format, biniou }:
22let
33 pname = "yojson";
44 param =
5− if stdenv.lib.versionAtLeast ocaml.version "4.01" then {
6− version = "1.3.3";
7− sha256 = "02l11facbr6bxrxq95vrcp1dxapp02kv7g4gq8rm62pb3dj5c6g7";
5+ if stdenv.lib.versionAtLeast ocaml.version "4.02" then {
6+ version = "1.4.0";
7+ sha256 = "0rzn4yihfi0psd2qmgrx5fvwpby87sqx4zws3ijf49f7wbpycccv";
8+ buildInputs = [ jbuilder ];
9+ extra = { inherit (jbuilder) installPhase; };
810 } else {
911 version = "1.2.3";
1012 sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl";
13+ buildInputs = [];
14+ extra = {
15+ createFindlibDestdir = true;
16+
17+ makeFlags = "PREFIX=$(out)";
18+
19+ preBuild = "mkdir $out/bin";
20+ };
1121 };
1222in
13−stdenv.mkDerivation {
23+stdenv.mkDerivation ({
1424
1525 name = "ocaml${ocaml.version}-${pname}-${param.version}";
1626
@@ -19,18 +29,10 @@ stdenv.mkDerivation {
1929 inherit (param) sha256;
2030 };
2131
22− buildInputs = [ ocaml findlib ];
32+ buildInputs = [ ocaml findlib ] ++ param.buildInputs;
2333
2434 propagatedBuildInputs = [ cppo easy-format biniou ];
2535
26− createFindlibDestdir = true;
27−
28− makeFlags = "PREFIX=$(out)";
29−
30− preBuild = ''
31− mkdir $out/bin
32− '';
33−
3436 meta = with stdenv.lib; {
3537 description = "An optimized parsing and printing library for the JSON format";
3638 homepage = "http://mjambon.com/${pname}.html";
@@ -38,4 +40,4 @@ stdenv.mkDerivation {
3840 maintainers = [ maintainers.vbgl ];
3941 platforms = ocaml.meta.platforms or [];
4042 };
41−}
43+} // param.extra)