add(nix): why3 (with provers)

This commit is contained in:
Léana 江 2024-03-12 19:00:45 +01:00 committed by Léana 江
parent 8ba2c081bf
commit efef532b06
6 changed files with 56 additions and 1 deletions

27
nix/custom/why3.nix Normal file
View file

@ -0,0 +1,27 @@
{
symlinkJoin,
makeWrapper,
why3,
alt-ergo,
cvc4,
z3_4_12,
}: let
provers = [
alt-ergo
cvc4
z3_4_12
];
in
symlinkJoin {
name = "why3";
# Generate configuration in the store, and wrap why3 with the corresponding option
paths = [
(why3.override {version = "1.6.0";})
];
buildInputs = provers;
nativeBuildInputs = [makeWrapper];
postBuild = ''
$out/bin/why3 config detect --config=$out/why3.conf
wrapProgram $out/bin/why3 --add-flags "--config=$out/why3.conf"
'';
}