about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-12-05 18:10:30 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-12-15 17:46:28 +0000
commit8278df916dde49d50cef8396458c18a688e40c13 (patch)
tree94184cb5a30310a4747db69b64b71708842ccac0
parente9782a194ac5ac1171b4bab32b19e11e7f444cdf (diff)
downloadnixlib-8278df916dde49d50cef8396458c18a688e40c13.tar
nixlib-8278df916dde49d50cef8396458c18a688e40c13.tar.gz
nixlib-8278df916dde49d50cef8396458c18a688e40c13.tar.bz2
nixlib-8278df916dde49d50cef8396458c18a688e40c13.tar.lz
nixlib-8278df916dde49d50cef8396458c18a688e40c13.tar.xz
nixlib-8278df916dde49d50cef8396458c18a688e40c13.tar.zst
nixlib-8278df916dde49d50cef8396458c18a688e40c13.zip
ocamlPackages.psq: init at 0.1.0
psq provides a functional priority search queue for OCaml.

Homepage: https://github.com/pqwy/psq
-rw-r--r--pkgs/development/ocaml-modules/psq/default.nix29
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 31 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;
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 215dfd6d6038..a9f1dfab633d 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -500,6 +500,8 @@ let
     piqi = callPackage ../development/ocaml-modules/piqi { };
     piqi-ocaml = callPackage ../development/ocaml-modules/piqi-ocaml { };
 
+    psq = callPackage ../development/ocaml-modules/psq { };
+
     ptime = callPackage ../development/ocaml-modules/ptime { };
 
     re2_p4 = callPackage ../development/ocaml-modules/re2 { };