about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/ocaml-modules/diet/default.nix26
-rw-r--r--pkgs/top-level/ocaml-packages.nix2
2 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/diet/default.nix b/pkgs/development/ocaml-modules/diet/default.nix
new file mode 100644
index 000000000000..0d4229c03ea3
--- /dev/null
+++ b/pkgs/development/ocaml-modules/diet/default.nix
@@ -0,0 +1,26 @@
+{ lib, buildDunePackage, fetchurl, stdlib-shims, ounit }:
+
+buildDunePackage rec {
+  pname = "diet";
+  version = "0.4";
+
+  src = fetchurl {
+    url =
+      "https://github.com/mirage/ocaml-diet/releases/download/v${version}/diet-v${version}.tbz";
+    sha256 = "96acac2e4fdedb5f47dd8ad2562e723d85ab59cd1bd85554df21ec907b071741";
+  };
+
+  minimumOCamlVersion = "4.03";
+
+  propagatedBuildInputs = [ stdlib-shims ];
+
+  doCheck = true;
+  checkInputs = [ ounit ];
+
+  meta = with lib; {
+    homepage = "https://github.com/mirage/ocaml-diet";
+    description = "Simple implementation of Discrete Interval Encoding Trees";
+    license = licenses.isc;
+    maintainers = with maintainers; [ ehmry ];
+  };
+}
diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix
index 97a7ad5030c2..83ed869bdcf3 100644
--- a/pkgs/top-level/ocaml-packages.nix
+++ b/pkgs/top-level/ocaml-packages.nix
@@ -203,6 +203,8 @@ let
 
     decompress =  callPackage ../development/ocaml-modules/decompress { };
 
+    diet =  callPackage ../development/ocaml-modules/diet { };
+
     digestif =  callPackage ../development/ocaml-modules/digestif { };
 
     dispatch =  callPackage ../development/ocaml-modules/dispatch { };