depot/third_party/nixpkgs/pkgs/applications/science/logic/cryptoverif/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

51 lines
1.3 KiB
Nix

{ lib, stdenv, fetchurl, ocaml }:
stdenv.mkDerivation (finalAttrs: {
pname = "cryptoverif";
version = "2.09";
src = fetchurl {
url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${finalAttrs.version}.tar.gz";
hash = "sha256-FJlPZgTUZ+6HzhG/B0dOiVIjDvoCnF6yg2E9UriSojw=";
};
/* 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. */
postPatch = ''
substituteInPlace ./src/syntax.ml \
--replace \"default\" \"$out/libexec/default\"
'';
strictDeps = true;
nativeBuildInputs = [ ocaml ];
buildPhase = ''
runHook preBuild
./build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/libexec
cp ./cryptoverif $out/bin
cp ./default.cvl $out/libexec
cp ./default.ocvl $out/libexec
runHook postInstall
'';
meta = {
description = "Cryptographic protocol verifier in the computational model";
mainProgram = "cryptoverif";
homepage = "https://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/";
license = lib.licenses.cecill-b;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.thoughtpolice ];
};
})