about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix')
-rw-r--r--nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix b/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix
new file mode 100644
index 000000000000..4bdc9f2e5ca2
--- /dev/null
+++ b/nixpkgs/pkgs/development/ocaml-modules/digestif/default.nix
@@ -0,0 +1,33 @@
+{ lib, ocaml, fetchurl, buildDunePackage
+, eqaf
+, alcotest, astring, bos, findlib, fpath
+}:
+
+buildDunePackage rec {
+  pname = "digestif";
+  version = "1.1.4";
+
+  minimalOCamlVersion = "4.08";
+  duneVersion = "3";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-${version}.tbz";
+    hash = "sha256-w3k+cg8NqAVPYobFRcghp/6+iC5/TlSX7ImxWjU1EeE=";
+  };
+
+  propagatedBuildInputs = [ eqaf ];
+
+  checkInputs = [ alcotest astring bos fpath ];
+  doCheck = true;
+
+  postCheck = ''
+    ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ test/test_runes.ml
+  '';
+
+  meta = {
+    description = "Simple hash algorithms in OCaml";
+    homepage = "https://github.com/mirage/digestif";
+    license = lib.licenses.mit;
+    maintainers = [ lib.maintainers.vbgl ];
+  };
+}