1 { lib, stdenv, fetchurl, ocaml, writeScript }:
3 stdenv.mkDerivation (finalAttrs: {
8 url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${finalAttrs.version}.tar.gz";
9 hash = "sha256-duc7t0Qpr1Z2FZEoufdQ7kcBlLbXHO+r9ivEgUxqK9s=";
12 /* Fix up the frontend to load the 'default' cryptoverif library
13 ** from under $out/libexec. By default, it expects to find the files
14 ** in $CWD which doesn't work. */
16 substituteInPlace ./src/syntax.ml \
17 --replace \"default\" \"$out/libexec/default\"
22 nativeBuildInputs = [ ocaml ];
35 mkdir -p $out/bin $out/libexec
36 cp ./cryptoverif $out/bin
37 cp ./default.cvl $out/libexec
38 cp ./default.ocvl $out/libexec
43 passthru.updateScript = writeScript "update-cryptoverif" ''
44 #!/usr/bin/env nix-shell
45 #!nix-shell -i bash -p common-updater-scripts curl pcre2
49 version="$(curl -s https://bblanche.gitlabpages.inria.fr/CryptoVerif/ |
50 pcre2grep -o1 '\bCryptoVerif version ([.[:alnum:]]+),')"
52 update-source-version "$UPDATE_NIX_ATTR_PATH" "$version"
56 description = "Cryptographic protocol verifier in the computational model";
57 mainProgram = "cryptoverif";
58 homepage = "https://bblanche.gitlabpages.inria.fr/CryptoVerif/";
59 license = lib.licenses.cecill-b;
60 platforms = lib.platforms.unix;
61 maintainers = [ lib.maintainers.thoughtpolice ];