2023-10-09 19:29:22 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3 }:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "easycrypt";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "2023.09";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "r${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-9xavU9jRisZekPqC87EyiLXtZCGu/9QeGzq6BJGt1+Y=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with ocamlPackages; [
|
|
|
|
dune_3
|
|
|
|
findlib
|
|
|
|
menhir
|
|
|
|
ocaml
|
|
|
|
];
|
|
|
|
buildInputs = with ocamlPackages; [
|
|
|
|
batteries
|
|
|
|
dune-build-info
|
|
|
|
inifiles
|
|
|
|
yojson
|
|
|
|
zarith
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ why3 ];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${version})'
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
dune install --prefix $out ${pname}
|
|
|
|
rm $out/bin/ec-runtest
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
homepage = "https://easycrypt.info/";
|
|
|
|
description = "Computer-Aided Cryptographic Proofs";
|
|
|
|
};
|
|
|
|
}
|