diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2022-04-27 11:22:33 +0200 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2022-05-05 06:57:50 +0200 |
commit | b20934a65c0541c2b83b688de24e3991b3db426e (patch) | |
tree | 3e753c14838eaba0e7a82c081e67e44dea8c6032 /pkgs/applications/science | |
parent | 602292f93d610fd52e7fa61e30e283123cf38a72 (diff) |
easycrypt: init at 2022.04
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/logic/easycrypt/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/science/logic/easycrypt/default.nix b/pkgs/applications/science/logic/easycrypt/default.nix new file mode 100644 index 0000000000000..5f28ca73c4e73 --- /dev/null +++ b/pkgs/applications/science/logic/easycrypt/default.nix @@ -0,0 +1,50 @@ +{ 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"; + }; +} |