summary refs log tree commit diff
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
parentd620d8fa6793d54d92055d87934006278f7888e1 (diff)
downloadnixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.gz
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.bz2
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.lz
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.xz
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.tar.zst
nixpkgs-98d4e4214525a368b4bd31587f8932b6dd049ada.zip
ocamlPackages.zmq: init at 20180726
-rw-r--r--maintainers/maintainer-list.nix5
-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
-rw-r--r--pkgs/top-level/ocaml-packages.nix4
5 files changed, 64 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index fe501623c69..13fa3ba9151 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -158,6 +158,11 @@
     github = "alexanderkjeldaas";
     name = "Alexander Kjeldaas";
   };
+  akavel = {
+    email = "czapkofan@gmail.com";
+    github = "akavel";
+    name = "Mateusz Czapliński";
+  };
   akaWolf = {
     email = "akawolf0@gmail.com";
     github = "akaWolf";
diff --git a/pkgs/development/ocaml-modules/zmq/default.nix b/pkgs/development/ocaml-modules/zmq/default.nix
new file mode 100644
index 00000000000..a792877e059
--- /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 00000000000..80c934b44d6
--- /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 00000000000..0d01e8b45f3
--- /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
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index c9df0f908ee..9f9bba933a1 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -753,6 +753,10 @@ let
 
     zed = callPackage ../development/ocaml-modules/zed { };
 
+    zmq = callPackage ../development/ocaml-modules/zmq { };
+
+    zmq-lwt = callPackage ../development/ocaml-modules/zmq/lwt.nix { };
+
     ocsigen_deriving = callPackage ../development/ocaml-modules/ocsigen-deriving {
       oasis = ocaml_oasis;
     };