about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/xml-light/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/xml-light/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/xml-light/default.nix17
1 files changed, 6 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/xml-light/default.nix b/pkgs/development/ocaml-modules/xml-light/default.nix
index 248b3f1240741..683d2ec214f1c 100644
--- a/pkgs/development/ocaml-modules/xml-light/default.nix
+++ b/pkgs/development/ocaml-modules/xml-light/default.nix
@@ -1,10 +1,8 @@
 { stdenv, lib, fetchFromGitHub, ocaml, findlib }:
-let
-  pname = "xml-light";
+
+stdenv.mkDerivation rec {
+  pname = "ocaml${ocaml.version}-xml-light";
   version = "2.4";
-in
-stdenv.mkDerivation {
-  name = "ocaml-${pname}-${version}";
 
   src = fetchFromGitHub {
     owner = "ncannasse";
@@ -17,15 +15,12 @@ stdenv.mkDerivation {
 
   createFindlibDestdir = true;
 
-  buildPhase = ''
-    make all
-    make opt
-  '';
-
   installPhase = ''
+    runHook preInstall
     make install_ocamlfind
     mkdir -p $out/share
     cp -vai doc $out/share/
+    runHook postInstall
   '';
 
   meta = {
@@ -40,6 +35,6 @@ stdenv.mkDerivation {
     homepage = "http://tech.motion-twin.com/xmllight.html";
     license = lib.licenses.lgpl21;
     maintainers = [ lib.maintainers.romildo ];
-    platforms = ocaml.meta.platforms or [ ];
+    inherit (ocaml.meta) platforms;
   };
 }