2024-01-02 11:29:13 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3, python3 }:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "easycrypt";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "2024.01";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "r${version}";
|
2024-01-25 14:12:00 +00:00
|
|
|
hash = "sha256-UYDoVMi5TtYxgPq5nkp/oRtcMcHl2p7KAG8ptvuOL5U=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with ocamlPackages; [
|
|
|
|
dune_3
|
|
|
|
findlib
|
|
|
|
menhir
|
|
|
|
ocaml
|
2024-01-02 11:29:13 +00:00
|
|
|
python3.pkgs.wrapPython
|
2022-04-27 09:35:20 +00:00
|
|
|
];
|
|
|
|
buildInputs = with ocamlPackages; [
|
|
|
|
batteries
|
|
|
|
dune-build-info
|
|
|
|
inifiles
|
2024-02-07 01:22:34 +00:00
|
|
|
why3
|
2022-04-27 09:35:20 +00:00
|
|
|
yojson
|
|
|
|
zarith
|
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
propagatedBuildInputs = [ why3.out ];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace dune-project --replace '(name easycrypt)' '(name easycrypt)(version ${version})'
|
|
|
|
'';
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonPath = with python3.pkgs; [ pyyaml ];
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
dune install --prefix $out ${pname}
|
|
|
|
rm $out/bin/ec-runtest
|
2024-01-02 11:29:13 +00:00
|
|
|
wrapPythonProgramsIn "$out/lib/easycrypt/commands" "$pythonPath"
|
2022-04-27 09:35:20 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
homepage = "https://easycrypt.info/";
|
|
|
|
description = "Computer-Aided Cryptographic Proofs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "easycrypt";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|