ocamlPackages.yojson: 1.2.3 -> 1.3.3

+11 -4
+11 -4
pkgs/development/ocaml-modules/yojson/default.nix
··· 1 { stdenv, fetchzip, ocaml, findlib, cppo, easy-format, biniou }: 2 let 3 pname = "yojson"; 4 - version = "1.2.3"; 5 in 6 stdenv.mkDerivation { 7 8 - name = "ocaml-${pname}-${version}"; 9 10 src = fetchzip { 11 - url = "https://github.com/mjambon/${pname}/archive/v${version}.tar.gz"; 12 - sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl"; 13 }; 14 15 buildInputs = [ ocaml findlib ];
··· 1 { stdenv, fetchzip, ocaml, findlib, cppo, easy-format, biniou }: 2 let 3 pname = "yojson"; 4 + param = 5 + if stdenv.lib.versionAtLeast ocaml.version "4.01" then { 6 + version = "1.3.3"; 7 + sha256 = "02l11facbr6bxrxq95vrcp1dxapp02kv7g4gq8rm62pb3dj5c6g7"; 8 + } else { 9 + version = "1.2.3"; 10 + sha256 = "10dvkndgwanvw4agbjln7kgb1n9s6lii7jw82kwxczl5rd1sgmvl"; 11 + }; 12 in 13 stdenv.mkDerivation { 14 15 + name = "ocaml${ocaml.version}-${pname}-${param.version}"; 16 17 src = fetchzip { 18 + url = "https://github.com/mjambon/${pname}/archive/v${param.version}.tar.gz"; 19 + inherit (param) sha256; 20 }; 21 22 buildInputs = [ ocaml findlib ];