summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/hex/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/hex/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/hex/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/hex/default.nix b/pkgs/development/ocaml-modules/hex/default.nix
new file mode 100644
index 00000000000..4a6123ebd3a
--- /dev/null
+++ b/pkgs/development/ocaml-modules/hex/default.nix
@@ -0,0 +1,25 @@
+{ lib, fetchurl, buildDunePackage, bigarray-compat, cstruct }:
+
+buildDunePackage rec {
+  pname = "hex";
+  version = "1.4.0";
+
+  useDune2 = true;
+
+  minimumOCamlVersion = "4.02";
+
+  src = fetchurl {
+    url = "https://github.com/mirage/ocaml-${pname}/releases/download/v${version}/hex-v${version}.tbz";
+    sha256 = "07b9y0lmnflsslkrm6xilkj40n8sf2hjqkyqghnk7sw5l0plkqsp";
+  };
+
+  propagatedBuildInputs = [ bigarray-compat cstruct ];
+  doCheck = true;
+
+  meta = {
+    description = "Mininal OCaml library providing hexadecimal converters";
+    homepage = "https://github.com/mirage/ocaml-hex";
+    license = lib.licenses.isc;
+    maintainers = with lib.maintainers; [ vbgl ];
+  };
+}