summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/hacl-star/raw.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/hacl-star/raw.nix')
-rw-r--r--pkgs/development/ocaml-modules/hacl-star/raw.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/hacl-star/raw.nix b/pkgs/development/ocaml-modules/hacl-star/raw.nix
new file mode 100644
index 00000000000..cd1217b9710
--- /dev/null
+++ b/pkgs/development/ocaml-modules/hacl-star/raw.nix
@@ -0,0 +1,51 @@
+{ lib, which, stdenv, fetchzip, ocaml, findlib, hacl-star, ctypes, cppo }:
+
+stdenv.mkDerivation rec {
+  pname = "ocaml${ocaml.version}-hacl-star-raw";
+  version = "0.3.2";
+
+  src = fetchzip {
+    url = "https://github.com/project-everest/hacl-star/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz";
+    sha256 = "1wp27vf0g43ggs7cv85hpa62jjvzkwzzg5rfznbwac6j6yr17zc7";
+    stripRoot = false;
+  };
+
+  sourceRoot = "./source/raw";
+
+  minimalOCamlVersion = "4.05";
+
+  postPatch = ''
+    patchShebangs ./
+  '';
+
+  preInstall = ''
+    mkdir -p $OCAMLFIND_DESTDIR/stublibs
+  '';
+
+  installTargets = "install-hacl-star-raw";
+
+  dontAddPrefix = true;
+
+  buildInputs = [
+    which
+    ocaml
+    findlib
+  ];
+
+  propagatedBuildInputs = [
+    ctypes
+  ];
+
+  checkInputs = [
+    cppo
+  ];
+
+  doCheck = true;
+
+  meta = {
+    description = "Auto-generated low-level OCaml bindings for EverCrypt/HACL*";
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.ulrikstrid ];
+    platforms = ocaml.meta.platforms;
+  };
+}