ocamlPackages.zmq: use buildDunePackage
This commit is contained in:
parent
7a2426ca77
commit
f56d52bbc3
|
@ -1,15 +1,8 @@
|
||||||
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, czmq, stdint }:
|
{ lib, fetchFromGitHub, buildDunePackage, czmq, stdint }:
|
||||||
|
|
||||||
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
buildDunePackage rec {
|
||||||
then throw "zmq is not available for OCaml ${ocaml.version}"
|
minimumOCamlVersion = "4.03";
|
||||||
else
|
pname = "zmq";
|
||||||
|
|
||||||
let __dune = dune; in
|
|
||||||
let dune = __dune.override { ocamlPackages = { inherit ocaml findlib; }; };
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "ocaml${ocaml.version}-zmq-${version}";
|
|
||||||
version = "20180726";
|
version = "20180726";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "issuu";
|
owner = "issuu";
|
||||||
|
@ -22,19 +15,14 @@ stdenv.mkDerivation rec {
|
||||||
./ocaml-zmq-issue43.patch
|
./ocaml-zmq-issue43.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ ocaml findlib dune czmq ];
|
buildInputs = [ czmq ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ stdint ];
|
propagatedBuildInputs = [ stdint ];
|
||||||
|
|
||||||
buildPhase = "dune build -p zmq";
|
meta = {
|
||||||
|
|
||||||
inherit (dune) installPhase;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
|
||||||
description = "ZeroMQ bindings for OCaml";
|
description = "ZeroMQ bindings for OCaml";
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with maintainers; [ akavel ];
|
maintainers = with lib.maintainers; [ akavel ];
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
inherit (ocaml.meta) platforms;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue