about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2017-12-05 18:19:25 +0000
committerVincent Laporte <Vincent.Laporte@gmail.com>2017-12-15 17:46:31 +0000
commitd39886db5a26d813aebfecb07f196f1d9bca26da (patch)
tree42f64393797a4ad9772c00fc431e8a7ec9303043
parent8a5d33ed527e16d458f323331e935ac74517f361 (diff)
downloadnixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar.gz
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar.bz2
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar.lz
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar.xz
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.tar.zst
nixlib-d39886db5a26d813aebfecb07f196f1d9bca26da.zip
ocamlPackages.digestif: init at 0.5
Digestif provides some hash functions in OCaml.

Homepage: https://github.com/mirage/digestif
-rw-r--r--pkgs/development/ocaml-modules/digestif/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/digestif/default.nix b/pkgs/development/ocaml-modules/digestif/default.nix
new file mode 100644
index 000000000000..cf8b5335d594
--- /dev/null
+++ b/pkgs/development/ocaml-modules/digestif/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:
+
+if !stdenv.lib.versionAtLeast ocaml.version "4.3"
+then throw "digestif is not available for OCaml ${ocaml.version}"
+else
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-digestif-${version}";
+  version = "0.5";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz";
+    sha256 = "0fsyfi5ps17j3wjav5176gf6z3a5xcw9aqhcr1gml9n9ayfbkhrd";
+  };
+
+  unpackCmd = "tar -xjf $curSrc";
+
+  buildInputs = [ ocaml findlib ocamlbuild topkg ];
+
+  inherit (topkg) buildPhase installPhase;
+
+  meta = {
+    description = "Simple hash algorithms in OCaml";
+    homepage = "https://github.com/mirage/digestif";
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.vbgl ];
+    inherit (ocaml.meta) platforms;
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 7fd18a664637..bab1e08ab8eb 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -200,6 +200,8 @@ let
 
     decompress =  callPackage ../development/ocaml-modules/decompress { };
 
+    digestif =  callPackage ../development/ocaml-modules/digestif { };
+
     dolmen =  callPackage ../development/ocaml-modules/dolmen { };
 
     dolog = callPackage ../development/ocaml-modules/dolog { };