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

View file

@ -2,6 +2,7 @@
callPackage,
unstable,
opam-nix,
alt-ergo,
}: let
mkNerdFont = callPackage ./mkNerdFont.nix {inherit (unstable) nerd-font-patcher;};
@ -20,6 +21,8 @@
font = hiosevka;
extraArgs = ["--name {/.}-NFP" "--variable-width-glyphs"];
};
why3 = callPackage ./why3.nix {inherit alt-ergo;};
in {
myPkgs = {
inherit
@ -28,6 +31,7 @@ in {
hiosevka
hiosevka-nerd-font-mono
hiosevka-nerd-font-propo
why3
;
};

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"
'';
}