diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-12-14 07:36:29 +0000 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2017-12-14 07:36:29 +0000 |
commit | 5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb (patch) | |
tree | 60dadc8764c40750a93ebd1c0b04d8b39251d5eb /pkgs/development/ocaml-modules/topkg/default.nix | |
parent | 9b6ef35b2c848702582a1a7574ab12e70cd4749a (diff) | |
download | nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar.gz nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar.bz2 nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar.lz nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar.xz nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.tar.zst nixlib-5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb.zip |
ocamlPackages.topkg: refactoring
Diffstat (limited to 'pkgs/development/ocaml-modules/topkg/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/topkg/default.nix | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/pkgs/development/ocaml-modules/topkg/default.nix b/pkgs/development/ocaml-modules/topkg/default.nix index ecd806ecadc9..7bcd0cdd115c 100644 --- a/pkgs/development/ocaml-modules/topkg/default.nix +++ b/pkgs/development/ocaml-modules/topkg/default.nix @@ -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; |