proverif: add interact support

authored by Shogo Takata and committed by Vincent Laporte ae5cc0f6 fbdf0b99

+38 -4
+37 -4
pkgs/by-name/pr/proverif/package.nix
··· 3 3 stdenv, 4 4 fetchurl, 5 5 ocamlPackages, 6 + makeBinaryWrapper, 7 + graphviz, 8 + m4, 9 + 10 + enable_interact ? false, 6 11 }: 7 12 8 13 stdenv.mkDerivation rec { ··· 16 21 17 22 strictDeps = true; 18 23 19 - nativeBuildInputs = with ocamlPackages; [ 20 - ocaml 21 - findlib 24 + nativeBuildInputs = 25 + with ocamlPackages; 26 + [ 27 + ocaml 28 + findlib 29 + ] 30 + ++ lib.optionals enable_interact [ makeBinaryWrapper ]; 31 + 32 + buildInputs = lib.optionals enable_interact [ 33 + ocamlPackages.lablgtk 22 34 ]; 35 + nativeCheckInputs = [ m4 ]; 23 36 24 - buildPhase = "./build -nointeract"; 37 + buildPhase = '' 38 + runHook preBuild 39 + ${if enable_interact then "./build" else "./build -nointeract"} 40 + runHook postBuild 41 + ''; 42 + 43 + doCheck = true; 44 + checkPhase = '' 45 + runHook preCheck 46 + ./test 47 + runHook postCheck 48 + ''; 49 + 25 50 installPhase = '' 26 51 runHook preInstall 52 + 27 53 install -D -t $out/bin proverif proveriftotex 28 54 install -D -t $out/share/emacs/site-lisp/ emacs/proverif.el 55 + 56 + ${lib.optionalString enable_interact '' 57 + install -D -t $out/bin proverif_interact 58 + wrapProgram $out/bin/proverif_interact \ 59 + --prefix PATH : ${lib.makeBinPath [ graphviz ]} 60 + ''} 61 + 29 62 runHook postInstall 30 63 ''; 31 64
+1
pkgs/by-name/pr/proverifWithGui/package.nix
··· 1 + { proverif }: proverif.override { enable_interact = true; }