2018-11-08 17:17:43 +00:00
|
|
|
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, czmq, stdint }:
|
2018-10-16 19:38:57 +00:00
|
|
|
|
2018-11-08 17:17:43 +00:00
|
|
|
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
|
|
|
|
then throw "zmq is not available for OCaml ${ocaml.version}"
|
|
|
|
else
|
|
|
|
|
|
|
|
let __dune = dune; in
|
|
|
|
let dune = __dune.override { ocamlPackages = { inherit ocaml findlib; }; };
|
|
|
|
in
|
2018-11-05 10:21:46 +00:00
|
|
|
|
2018-11-08 17:17:43 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "ocaml${ocaml.version}-zmq-${version}";
|
|
|
|
version = "20180726";
|
2018-10-16 19:38:57 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "issuu";
|
|
|
|
repo = "ocaml-zmq";
|
|
|
|
rev = "d312a8458d6b688f75470248f11875fbbfa5bb1a";
|
|
|
|
sha256 = "1f5l4bw78y4drabhyvmpj3z8k30bill33ca7bzhr02m55yf6gqpf";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./ocaml-zmq-issue43.patch
|
|
|
|
];
|
|
|
|
|
2018-11-08 17:17:43 +00:00
|
|
|
buildInputs = [ ocaml findlib dune czmq ];
|
|
|
|
|
2018-10-16 19:38:57 +00:00
|
|
|
propagatedBuildInputs = [ stdint ];
|
|
|
|
|
2018-11-08 17:17:43 +00:00
|
|
|
buildPhase = "dune build -p zmq";
|
|
|
|
|
|
|
|
inherit (dune) installPhase;
|
|
|
|
|
2018-10-16 19:38:57 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "ZeroMQ bindings for OCaml";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ akavel ];
|
|
|
|
inherit (src.meta) homepage;
|
2018-11-08 17:17:43 +00:00
|
|
|
inherit (ocaml.meta) platforms;
|
2018-10-16 19:38:57 +00:00
|
|
|
};
|
|
|
|
}
|