2021-01-17 00:15:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, ocaml }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-20 14:57:18 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "cryptoverif";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "2.09";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2024-06-20 14:57:18 +00:00
|
|
|
url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${finalAttrs.version}.tar.gz";
|
|
|
|
hash = "sha256-FJlPZgTUZ+6HzhG/B0dOiVIjDvoCnF6yg2E9UriSojw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Fix up the frontend to load the 'default' cryptoverif library
|
|
|
|
** from under $out/libexec. By default, it expects to find the files
|
|
|
|
** in $CWD which doesn't work. */
|
2023-10-19 13:55:26 +00:00
|
|
|
postPatch = ''
|
2020-12-25 13:55:36 +00:00
|
|
|
substituteInPlace ./src/syntax.ml \
|
2020-04-24 23:36:52 +00:00
|
|
|
--replace \"default\" \"$out/libexec/default\"
|
|
|
|
'';
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ocaml ];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
./build
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
installPhase = ''
|
2023-10-19 13:55:26 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
mkdir -p $out/bin $out/libexec
|
|
|
|
cp ./cryptoverif $out/bin
|
|
|
|
cp ./default.cvl $out/libexec
|
|
|
|
cp ./default.ocvl $out/libexec
|
2023-10-19 13:55:26 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Cryptographic protocol verifier in the computational model";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "cryptoverif";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/";
|
2021-01-17 00:15:33 +00:00
|
|
|
license = lib.licenses.cecill-b;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = [ lib.maintainers.thoughtpolice ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2024-06-20 14:57:18 +00:00
|
|
|
})
|