about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/zmq/default.nix
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/zmq/default.nix
parent5fc73fd52e7e9aa56911d152e3a5c49de8a18f61 (diff)
buildDunePackage: new support function; use it to refactor some OCaml derivations
Diffstat (limited to 'pkgs/development/ocaml-modules/zmq/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/zmq/default.nix15
1 files changed, 5 insertions, 10 deletions
diff --git a/pkgs/development/ocaml-modules/zmq/default.nix b/pkgs/development/ocaml-modules/zmq/default.nix
index a792877e0590a..fe6a17e876b60 100644
--- a/pkgs/development/ocaml-modules/zmq/default.nix
+++ b/pkgs/development/ocaml-modules/zmq/default.nix
@@ -1,8 +1,9 @@
-{ stdenv, fetchFromGitHub, ocaml, findlib, dune, czmq, stdint }:
+{ stdenv, fetchFromGitHub, buildDunePackage, czmq, stdint }:
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-zmq-${version}";
+buildDunePackage rec {
+  pname = "zmq";
   version = "20180726";
+
   src = fetchFromGitHub {
     owner = "issuu";
     repo = "ocaml-zmq";
@@ -14,19 +15,13 @@ stdenv.mkDerivation rec {
     ./ocaml-zmq-issue43.patch
   ];
 
-  buildInputs = [ ocaml findlib dune czmq ];
-
+  buildInputs = [ czmq ];
   propagatedBuildInputs = [ stdint ];
 
-  buildPhase = "dune build -p zmq";
-
-  inherit (dune) installPhase;
-
   meta = with stdenv.lib; {
     description = "ZeroMQ bindings for OCaml";
     license     = licenses.mit;
     maintainers = with maintainers; [ akavel ];
     inherit (src.meta) homepage;
-    inherit (ocaml.meta) platforms;
   };
 }