git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.mtime: 0.8.3 -> 0.8.4, 1.1.0
commit64ff2e271268d3bad6b8a64704d36b1ffb62c1e5 authorVincent Laporte <Vincent.Laporte@gmail.com> dateWed 28 Jun 2017, 17:19 (9 years ago) parentad14290
1 file changed+19−8
pkgs/development/ocaml-modules/mtime/default.nix+19−8
pkgs/development/ocaml-modules/mtime/default.nix+19−8
@@ -1,25 +1,36 @@
1−{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, opam, js_of_ocaml
2−, jsooSupport ? !(stdenv.lib.versionAtLeast ocaml.version "4.04")
1+{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, topkg, opam, js_of_ocaml
2+, jsooSupport ? true
33}:
44
55with lib;
66
7+let param =
8+ if versionAtLeast ocaml.version "4.03"
9+ then {
10+ version = "1.1.0";
11+ sha256 = "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3";
12+ } else {
13+ version = "0.8.4";
14+ sha256 = "1adm8sc3lkjly99hyi5gqnxas748k7h62ljgn8x423nkn8gyp8dh";
15+ };
16+in
17+
718stdenv.mkDerivation {
8− name = "ocaml${ocaml.version}-mtime-0.8.3";
19+ name = "ocaml${ocaml.version}-mtime-${param.version}";
920
1021 src = fetchurl {
11− url = http://erratique.ch/software/mtime/releases/mtime-0.8.3.tbz;
12− sha256 = "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah";
22+ url = "http://erratique.ch/software/mtime/releases/mtime-${param.version}.tbz";
23+ inherit (param) sha256;
1324 };
1425
1526 unpackCmd = "tar xjf $src";
1627
17− buildInputs = [ ocaml findlib ocamlbuild opam ]
28+ buildInputs = [ ocaml findlib ocamlbuild opam topkg ]
1829 ++ stdenv.lib.optional jsooSupport js_of_ocaml;
1930
20− buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true jsoo=${boolToString jsooSupport}";
31+ buildPhase = "${topkg.buildPhase} --with-js_of_ocaml ${boolToString jsooSupport}";
2132
22− installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
33+ inherit (topkg) installPhase;
2334
2435 meta = {
2536 description = "Monotonic wall-clock time for OCaml";