about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/camlimages
diff options
context:
space:
mode:
authorThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-05 11:21:46 +0100
committerThéo Zimmermann <theo.zimmermann@univ-paris-diderot.fr>2018-11-07 10:08:03 +0100
commit794158fcd54b862f3775bc8b54495a842a250b7b (patch)
tree333ef218a45bf9ca5d20186dc67bb9bd5209aca3 /pkgs/development/ocaml-modules/camlimages
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/camlimages')
-rw-r--r--pkgs/development/ocaml-modules/camlimages/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/camlimages/default.nix b/pkgs/development/ocaml-modules/camlimages/default.nix
index b5ef173c9ff8e..065c5a650b848 100644
--- a/pkgs/development/ocaml-modules/camlimages/default.nix
+++ b/pkgs/development/ocaml-modules/camlimages/default.nix
@@ -1,15 +1,16 @@
-{ stdenv, fetchzip, findlib, dune, ocaml, configurator, cppo, lablgtk }:
-stdenv.mkDerivation rec {
-  name = "camlimages-${version}";
+{ stdenv, fetchzip, buildDunePackage, configurator, cppo, lablgtk }:
+
+buildDunePackage rec {
+  pname = "camlimages";
   version = "5.0.0";
+
   src = fetchzip {
-    url = "https://bitbucket.org/camlspotter/camlimages/get/${version}.tar.gz";
+    url = "https://bitbucket.org/camlspotter/${pname}/get/${version}.tar.gz";
     sha256 = "00qvwxkfnhv93yi1iq7vy3p5lxyi9xigxcq464s4ii6bmp32d998";
   };
-  buildInputs = [ findlib dune ocaml configurator cppo lablgtk ];
-  buildPhase = "dune build -p camlimages";
-  inherit (dune) installPhase;
-  
+
+  buildInputs = [ configurator cppo lablgtk ];
+
   meta = with stdenv.lib; {
     branch = "5.0";
     homepage = https://bitbucket.org/camlspotter/camlimages;