diff options
author | Ulrik Strid <ulrik.strid@outlook.com> | 2021-07-19 12:01:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-19 12:01:44 +0200 |
commit | 55d50f19bffde046cd74acb7d6d4bf3a9349edc3 (patch) | |
tree | 304f094d5d13c1f4625a3d1430df4543700d24eb /pkgs/development/ocaml-modules | |
parent | 7e2e486bbf84f6ec694bb30085f8faa5ce2a805f (diff) | |
download | nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar.gz nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar.bz2 nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar.lz nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar.xz nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.tar.zst nixlib-55d50f19bffde046cd74acb7d6d4bf3a9349edc3.zip |
ocamlPackages.hacl-star: init at 0.3.2 (#130277)
ocamlPackages.hacl-star-raw: init at 0.3.2
Diffstat (limited to 'pkgs/development/ocaml-modules')
-rw-r--r-- | pkgs/development/ocaml-modules/hacl-star/default.nix | 18 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/hacl-star/raw.nix | 51 |
2 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/hacl-star/default.nix b/pkgs/development/ocaml-modules/hacl-star/default.nix new file mode 100644 index 000000000000..8a29439c7a59 --- /dev/null +++ b/pkgs/development/ocaml-modules/hacl-star/default.nix @@ -0,0 +1,18 @@ +{ lib, buildDunePackage, hacl-star-raw, zarith, cppo }: + +buildDunePackage { + pname = "hacl-star"; + + inherit (hacl-star-raw) version src meta doCheck minimalOCamlVersion; + + useDune2 = true; + + propagatedBuildInputs = [ + hacl-star-raw + zarith + ]; + + buildInputs = [ + cppo + ]; +} 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 000000000000..cd1217b97101 --- /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; + }; +} |