about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/astring
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-12-14 07:36:29 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-12-14 07:36:29 +0000
commit5e4edcc4ec175d0b4ed8f210de9a2e003e3926cb (patch)
tree60dadc8764c40750a93ebd1c0b04d8b39251d5eb /pkgs/development/ocaml-modules/astring
parent9b6ef35b2c848702582a1a7574ab12e70cd4749a (diff)
ocamlPackages.topkg: refactoring
Diffstat (limited to 'pkgs/development/ocaml-modules/astring')
-rw-r--r--pkgs/development/ocaml-modules/astring/default.nix13
1 files changed, 3 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/astring/default.nix b/pkgs/development/ocaml-modules/astring/default.nix
index d172b0f746390..97c59d8581fb1 100644
--- a/pkgs/development/ocaml-modules/astring/default.nix
+++ b/pkgs/development/ocaml-modules/astring/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg, opam}:
+{ stdenv, fetchurl, buildOcaml, ocaml, findlib, ocamlbuild, topkg }:
 
 buildOcaml rec {
   version = "0.8.3";
@@ -11,16 +11,9 @@ buildOcaml rec {
 
   unpackCmd = "tar -xf $curSrc";
 
-  buildInputs = [ ocaml findlib ocamlbuild topkg opam ];
+  buildInputs = [ ocaml findlib ocamlbuild topkg ];
 
-  buildPhase = ''
-    ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ pkg/pkg.ml build
-  '';
-
-  installPhase = ''
-    opam-installer --script --prefix=$out astring.install | sh
-    ln -s $out/lib/astring $out/lib/ocaml/${ocaml.version}/site-lib/
-  '';
+  inherit (topkg) buildPhase installPhase;
 
   meta = {
     homepage = http://erratique.ch/software/astring;