summary refs log tree commit diff
path: root/pkgs/applications/science/logic/cryptoverif/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/logic/cryptoverif/default.nix')
-rw-r--r--pkgs/applications/science/logic/cryptoverif/default.nix27
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/applications/science/logic/cryptoverif/default.nix b/pkgs/applications/science/logic/cryptoverif/default.nix
index f056b3e433f..66ba807c8dd 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=";
   };
 
-  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 = ''
+  postPatch = ''
     substituteInPlace ./src/syntax.ml \
       --replace \"default\" \"$out/libexec/default\"
   '';
 
-  buildPhase = "./build";
+  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 = {