about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/zmq
diff options
context:
space:
mode:
authorMateusz CzapliƄski <czapkofan@gmail.com>2018-10-16 21:38:57 +0200
committerVincent Laporte <vbgl@users.noreply.github.com>2018-10-22 06:51:17 +0000
commit98d4e4214525a368b4bd31587f8932b6dd049ada (patch)
tree894d5f4afb3ed58f66dd6fe6c12df6352af894a5 /pkgs/development/ocaml-modules/zmq
parentd620d8fa6793d54d92055d87934006278f7888e1 (diff)
downloadnixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.gz
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.bz2
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.lz
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.xz
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.zst
nixlib-98d4e4214525a368b4bd31587f8932b6dd049ada.zip
ocamlPackages.zmq: init at 20180726
Diffstat (limited to 'pkgs/development/ocaml-modules/zmq')
-rw-r--r--pkgs/development/ocaml-modules/zmq/default.nix32
-rw-r--r--pkgs/development/ocaml-modules/zmq/lwt.nix12
-rw-r--r--pkgs/development/ocaml-modules/zmq/ocaml-zmq-issue43.patch11
3 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/zmq/default.nix b/pkgs/development/ocaml-modules/zmq/default.nix
new file mode 100644
index 000000000000..a792877e0590
--- /dev/null
+++ b/pkgs/development/ocaml-modules/zmq/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, dune, czmq, stdint }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-zmq-${version}";
+  version = "20180726";
+  src = fetchFromGitHub {
+    owner = "issuu";
+    repo = "ocaml-zmq";
+    rev = "d312a8458d6b688f75470248f11875fbbfa5bb1a";
+    sha256 = "1f5l4bw78y4drabhyvmpj3z8k30bill33ca7bzhr02m55yf6gqpf";
+  };
+
+  patches = [
+    ./ocaml-zmq-issue43.patch
+  ];
+
+  buildInputs = [ ocaml findlib dune 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;
+  };
+}
diff --git a/pkgs/development/ocaml-modules/zmq/lwt.nix b/pkgs/development/ocaml-modules/zmq/lwt.nix
new file mode 100644
index 000000000000..80c934b44d64
--- /dev/null
+++ b/pkgs/development/ocaml-modules/zmq/lwt.nix
@@ -0,0 +1,12 @@
+{ stdenv, ocaml, findlib, dune, zmq, ocaml_lwt }:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-zmq-lwt-${version}";
+  inherit (zmq) version src installPhase meta;
+
+  buildInputs = [ ocaml findlib dune ];
+
+  propagatedBuildInputs = [ zmq ocaml_lwt ];
+
+  buildPhase = "dune build -p zmq-lwt";
+}
diff --git a/pkgs/development/ocaml-modules/zmq/ocaml-zmq-issue43.patch b/pkgs/development/ocaml-modules/zmq/ocaml-zmq-issue43.patch
new file mode 100644
index 000000000000..0d01e8b45f39
--- /dev/null
+++ b/pkgs/development/ocaml-modules/zmq/ocaml-zmq-issue43.patch
@@ -0,0 +1,11 @@
+--- source/zmq/src/caml_zmq_stubs.c	1970-01-01 01:00:01.000000000 +0100
++++ source/zmq/src/caml_zmq_stubs.c	1970-01-01 01:00:01.000000000 +0100
+@@ -35,7 +35,7 @@
+ #include "socket.h"
+ #include "msg.h"
+ 
+-#include <uint64.h>
++#include <ocaml_stdint/uint64.h>
+ 
+ /**
+  * Version