proverif: add interact support

This commit is contained in:
Shogo Takata
2025-07-10 10:08:46 +02:00
committed by Vincent Laporte
parent fbdf0b99ff
commit ae5cc0f6dc
2 changed files with 38 additions and 4 deletions
+37 -4
View File
@@ -3,6 +3,11 @@
stdenv,
fetchurl,
ocamlPackages,
makeBinaryWrapper,
graphviz,
m4,
enable_interact ? false,
}:
stdenv.mkDerivation rec {
@@ -16,16 +21,44 @@ stdenv.mkDerivation rec {
strictDeps = true;
nativeBuildInputs = with ocamlPackages; [
ocaml
findlib
nativeBuildInputs =
with ocamlPackages;
[
ocaml
findlib
]
++ lib.optionals enable_interact [ makeBinaryWrapper ];
buildInputs = lib.optionals enable_interact [
ocamlPackages.lablgtk
];
nativeCheckInputs = [ m4 ];
buildPhase = ''
runHook preBuild
${if enable_interact then "./build" else "./build -nointeract"}
runHook postBuild
'';
doCheck = true;
checkPhase = ''
runHook preCheck
./test
runHook postCheck
'';
buildPhase = "./build -nointeract";
installPhase = ''
runHook preInstall
install -D -t $out/bin proverif proveriftotex
install -D -t $out/share/emacs/site-lisp/ emacs/proverif.el
${lib.optionalString enable_interact ''
install -D -t $out/bin proverif_interact
wrapProgram $out/bin/proverif_interact \
--prefix PATH : ${lib.makeBinPath [ graphviz ]}
''}
runHook postInstall
'';
@@ -0,0 +1 @@
{ proverif }: proverif.override { enable_interact = true; }