summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2022-02-10 22:16:47 +0100
committerVincent Laporte <Vincent.Laporte@gmail.com>2022-02-11 07:17:40 +0100
commitd43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6 (patch)
treeb6bc8049d94ab6ae3d0784686b5dee31f5452b67
parentbb8a321187c9465d7076ad9fcedfd45be3662d1d (diff)
downloadnixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar.gz
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar.bz2
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar.lz
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar.xz
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.tar.zst
nixpkgs-d43bbd7af8ec6567f0b4927aedddeb3a9daa1ba6.zip
ocamlPackages.xml-light: fix build after 9a778368f2a61787c2b9d100e364fc0474130175
-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 248b3f12407..683d2ec214f 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;
   };
 }