git.iko.soy/typeable/nixpkgs
on master help sign in
ocamlPackages.hacl-star: init at 0.3.2 (#130277)

ocamlPackages.hacl-star-raw: init at 0.3.2

commit55d50f19bffde046cd74acb7d6d4bf3a9349edc3 authorUlrik Strid <ulrik.strid@outlook.com> dateMon 19 Jul 2021, 12:01 (5 years ago) parent7e2e486
3 files changed+72
pkgs/development/ocaml-modules/hacl-star/default.nix+18 pkgs/development/ocaml-modules/hacl-star/raw.nix+51 pkgs/top-level/ocaml-packages.nix+3
pkgs/development/ocaml-modules/hacl-star/default.nixnew file+18
@@ -0,0 +1,18 @@
1+{ lib, buildDunePackage, hacl-star-raw, zarith, cppo }:
2+
3+buildDunePackage {
4+ pname = "hacl-star";
5+
6+ inherit (hacl-star-raw) version src meta doCheck minimalOCamlVersion;
7+
8+ useDune2 = true;
9+
10+ propagatedBuildInputs = [
11+ hacl-star-raw
12+ zarith
13+ ];
14+
15+ buildInputs = [
16+ cppo
17+ ];
18+}
pkgs/development/ocaml-modules/hacl-star/raw.nixnew file+51
@@ -0,0 +1,51 @@
1+{ lib, which, stdenv, fetchzip, ocaml, findlib, hacl-star, ctypes, cppo }:
2+
3+stdenv.mkDerivation rec {
4+ pname = "ocaml${ocaml.version}-hacl-star-raw";
5+ version = "0.3.2";
6+
7+ src = fetchzip {
8+ url = "https://github.com/project-everest/hacl-star/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz";
9+ sha256 = "1wp27vf0g43ggs7cv85hpa62jjvzkwzzg5rfznbwac6j6yr17zc7";
10+ stripRoot = false;
11+ };
12+
13+ sourceRoot = "./source/raw";
14+
15+ minimalOCamlVersion = "4.05";
16+
17+ postPatch = ''
18+ patchShebangs ./
19+ '';
20+
21+ preInstall = ''
22+ mkdir -p $OCAMLFIND_DESTDIR/stublibs
23+ '';
24+
25+ installTargets = "install-hacl-star-raw";
26+
27+ dontAddPrefix = true;
28+
29+ buildInputs = [
30+ which
31+ ocaml
32+ findlib
33+ ];
34+
35+ propagatedBuildInputs = [
36+ ctypes
37+ ];
38+
39+ checkInputs = [
40+ cppo
41+ ];
42+
43+ doCheck = true;
44+
45+ meta = {
46+ description = "Auto-generated low-level OCaml bindings for EverCrypt/HACL*";
47+ license = lib.licenses.asl20;
48+ maintainers = [ lib.maintainers.ulrikstrid ];
49+ platforms = ocaml.meta.platforms;
50+ };
51+}
pkgs/top-level/ocaml-packages.nix+3
@@ -417,6 +417,9 @@ let
417417
418418 hacl_x25519 = callPackage ../development/ocaml-modules/hacl_x25519 { };
419419
420+ hacl-star = callPackage ../development/ocaml-modules/hacl-star { };
421+ hacl-star-raw = callPackage ../development/ocaml-modules/hacl-star/raw.nix { };
422+
420423 herelib = callPackage ../development/ocaml-modules/herelib { };
421424
422425 hidapi = callPackage ../development/ocaml-modules/hidapi { };