From 2890949ab5a0cf76751168f333e6be54d84d060b Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 10 Oct 2023 14:23:06 +0200 Subject: [PATCH] cryptoverif: 2.05 -> 2.07 --- .../science/logic/cryptoverif/default.nix | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/logic/cryptoverif/default.nix b/pkgs/applications/science/logic/cryptoverif/default.nix index f056b3e433fb..66ba807c8dd8 100644 --- a/pkgs/applications/science/logic/cryptoverif/default.nix +++ b/pkgs/applications/science/logic/cryptoverif/default.nix @@ -2,31 +2,42 @@ stdenv.mkDerivation rec { pname = "cryptoverif"; - version = "2.05"; + version = "2.07"; src = fetchurl { url = "http://prosecco.gforge.inria.fr/personal/bblanche/cryptoverif/cryptoverif${version}.tar.gz"; - sha256 = "sha256-F5eVN5ATYo9Ivpi2eYh96ktuTWUeoqgWMR4BqHu8EFs="; + hash = "sha256-GXXql4+JZ396BM6W2I3kN0u59xos7UCAtzR0IjMIETY="; }; + /* 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 ]; - /* 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. */ - patchPhase = '' - substituteInPlace ./src/syntax.ml \ - --replace \"default\" \"$out/libexec/default\" + buildPhase = '' + runHook preBuild + + ./build + + runHook postBuild ''; - buildPhase = "./build"; 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 = {