summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/psq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/psq/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/psq/default.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/psq/default.nix b/pkgs/development/ocaml-modules/psq/default.nix
new file mode 100644
index 000000000000..fc3fa81a02a9
--- /dev/null
+++ b/pkgs/development/ocaml-modules/psq/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.02"
+then throw "psq is not available for OCaml ${ocaml.version}"
+else
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-psq-${version}";
+  version = "0.1.0";
+
+  src = fetchurl {
+    url = "https://github.com/pqwy/psq/releases/download/v${version}/psq-${version}.tbz";
+    sha256 = "08ghgdivbjrxnaqc3hsb69mr9s2ql5ds0fb97b7z6zimzqibz6lp";
+  };
+
+  unpackCmd = "tar -xjf $curSrc";
+
+  buildInputs = [ ocaml findlib ocamlbuild topkg ];
+
+  inherit (topkg) buildPhase installPhase;
+
+  meta = {
+    description = "Functional Priority Search Queues for OCaml";
+    homepage = "https://github.com/pqwy/psq";
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    license = stdenv.lib.licenses.isc;
+    inherit (ocaml.meta) platforms;
+  };
+}