mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
ocamlPackages.hacl-star: 0.4.5 -> 0.7.0
This commit is contained in:
parent
1d35a119c7
commit
02cda04c0a
@ -1,11 +1,12 @@
|
||||
{ lib, buildDunePackage, hacl-star-raw, zarith, cppo }:
|
||||
{ lib, buildDunePackage, hacl-star-raw, zarith, cppo, alcotest, secp256k1-internal, qcheck-core, cstruct }:
|
||||
|
||||
|
||||
buildDunePackage {
|
||||
pname = "hacl-star";
|
||||
|
||||
inherit (hacl-star-raw) version src meta doCheck minimalOCamlVersion;
|
||||
|
||||
useDune2 = true;
|
||||
duneVersion = "3";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
hacl-star-raw
|
||||
@ -16,5 +17,10 @@ buildDunePackage {
|
||||
cppo
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
checkInputs = [
|
||||
alcotest
|
||||
secp256k1-internal
|
||||
qcheck-core
|
||||
cstruct
|
||||
];
|
||||
}
|
||||
|
@ -1,17 +1,25 @@
|
||||
{ lib, which, stdenv, fetchzip, ocaml, findlib, hacl-star, ctypes, cppo }:
|
||||
|
||||
{ lib
|
||||
, which
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, opaline
|
||||
, cmake
|
||||
, ocaml
|
||||
, findlib
|
||||
, hacl-star
|
||||
, ctypes
|
||||
, cppo
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ocaml${ocaml.version}-hacl-star-raw";
|
||||
version = "0.4.5";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/project-everest/hacl-star/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz";
|
||||
sha256 = "1330vgbf5krlkvifby96kyk13xhmihajk2w5hgf2761jrljmnnrs";
|
||||
url = "https://github.com/cryspen/hacl-packages/releases/download/ocaml-v${version}/hacl-star.${version}.tar.gz";
|
||||
sha256 = "sha256-jJtxVYhQgP8ItfLhQ2wcF8RKNRnYhB2j0nR7/YH1NfY=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
sourceRoot = "./source/raw";
|
||||
|
||||
minimalOCamlVersion = "4.08";
|
||||
|
||||
# strictoverflow is disabled because it breaks aarch64-darwin
|
||||
@ -21,18 +29,34 @@ stdenv.mkDerivation rec {
|
||||
patchShebangs ./
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
make -C hacl-star-raw build-c
|
||||
make -C hacl-star-raw build-bindings
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installTargets = "install-hacl-star-raw";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
echo $OCAMLFIND_DESTDIR
|
||||
mkdir $out
|
||||
mkdir -p $OCAMLFIND_DESTDIR/stublibs
|
||||
make -C hacl-star-raw install
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
dontAddPrefix = true;
|
||||
dontAddStaticConfigureFlags = true;
|
||||
configurePlatforms = [];
|
||||
createFindlibDestdir = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
which
|
||||
cmake
|
||||
ocaml
|
||||
findlib
|
||||
];
|
||||
@ -41,7 +65,7 @@ stdenv.mkDerivation rec {
|
||||
ctypes
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
checkInputs = [
|
||||
cppo
|
||||
];
|
||||
|
||||
@ -50,9 +74,9 @@ stdenv.mkDerivation rec {
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
inherit (ocaml.meta) platforms;
|
||||
description = "Auto-generated low-level OCaml bindings for EverCrypt/HACL*";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
platforms = ocaml.meta.platforms;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user