My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/applications/science/logic/easycrypt/default.nix

50 lines
1.0 KiB

{ lib, stdenv, fetchFromGitHub, ocamlPackages, why3 }:
stdenv.mkDerivation rec {
pname = "easycrypt";
version = "2022.04";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "r${version}";
sha256 = "sha256:09rdwcj70lkamkhd895p284rfpz4bcnsf55mcimhiqncd2a21ml7";
};
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";
};
}