13 stdenv.mkDerivation rec {
14 pname = "ocaml${ocaml.version}-hacl-star-raw";
18 url = "https://github.com/cryspen/hacl-packages/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz";
19 hash = "sha256-TcAEaJou4BOVXSz5DYewzKfvIpjXmhLAlgF0hlq3ToQ=";
27 # strictoverflow is disabled because it breaks aarch64-darwin
28 hardeningDisable = [ "strictoverflow" ];
30 # Compatibility with ctypes ≥ 0.21
31 # see: https://github.com/cryspen/hacl-packages/commit/81303b83a54a92d3b5f54f1b8ddbea60438cc2bf
33 substituteInPlace hacl-star-raw/META --replace-warn 'requires="ctypes"' 'requires="ctypes ctypes.stubs"'
40 make -C hacl-star-raw build-c
41 make -C hacl-star-raw build-bindings
48 mkdir -p $OCAMLFIND_DESTDIR/stublibs
54 make -C hacl-star-raw install
59 dontUseCmakeConfigure = true;
61 dontAddStaticConfigureFlags = true;
62 createFindlibDestdir = true;
71 propagatedBuildInputs = [
84 inherit (ocaml.meta) platforms;
85 description = "Auto-generated low-level OCaml bindings for EverCrypt/HACL*";
86 license = lib.licenses.asl20;
87 maintainers = [ lib.maintainers.ulrikstrid ];