@@ -1,33 +1,30 @@
1−{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam, topkg, result }:
1+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opam }:
22
33let
44 pname = "cmdliner";
55in
66
7−assert stdenv.lib.versionAtLeast ocaml.version "4.01.0";
7+assert stdenv.lib.versionAtLeast ocaml.version "3.12";
88
99stdenv.mkDerivation rec {
10+
1011 name = "ocaml-${pname}-${version}";
11− version = "1.0.0";
12+ version = "0.9.8";
1213
1314 src = fetchurl {
1415 url = "http://erratique.ch/software/${pname}/releases/${pname}-${version}.tbz";
15− sha256 = "1ryn7qis0izg0wcal8zdlikzzl689l75y6f4zc6blrm93y5agy9x";
16+ sha256 = "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx";
1617 };
1718
1819 unpackCmd = "tar xjf $src";
19−
20− nativeBuildInputs = [ ocamlbuild opam topkg ];
20+ nativeBuildInputs = [ ocamlbuild opam ];
2121 buildInputs = [ ocaml findlib ];
22− propagatedBuildInputs = [ result ];
2322
2423 createFindlibDestdir = true;
2524
26− buildPhase = ''
27− ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib pkg/pkg.ml build
28− '';
29−
30− installPhase = ''
25+ configurePhase = "ocaml pkg/git.ml";
26+ buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
27+ installPhase = ''
3128 opam-installer --script --prefix=$out | sh
3229 ln -s $out/lib/${pname} $out/lib/ocaml/${ocaml.version}/site-lib/
3330 '';