ocamlPackages.topkg: refactoring
This commit is contained in:
@@ -4,6 +4,10 @@ if !stdenv.lib.versionAtLeast ocaml.version "4.01"
|
||||
then throw "topkg is not available for OCaml ${ocaml.version}"
|
||||
else
|
||||
|
||||
let
|
||||
run = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml";
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ocaml${ocaml.version}-topkg-${version}";
|
||||
version = "0.9.1";
|
||||
@@ -13,14 +17,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "1slrzbmyp81xhgsfwwqs2d6gxzvqx0gcp34rq00h5iblhcq7myx6";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ opam ];
|
||||
buildInputs = [ ocaml findlib ocamlbuild ];
|
||||
propagatedBuildInputs = [ result ];
|
||||
|
||||
unpackCmd = "tar xjf ${src}";
|
||||
buildPhase = "ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build";
|
||||
buildPhase = "${run} build";
|
||||
createFindlibDestdir = true;
|
||||
installPhase = "opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
|
||||
installPhase = "${opam}/bin/opam-installer -i --prefix=$out --libdir=$OCAMLFIND_DESTDIR";
|
||||
|
||||
passthru = { inherit run; };
|
||||
|
||||
meta = {
|
||||
homepage = http://erratique.ch/software/topkg;
|
||||
|
||||
Reference in New Issue
Block a user