Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
39 lines
855 B
Nix
39 lines
855 B
Nix
{
|
|
stdenv,
|
|
makeWrapper,
|
|
runCommand,
|
|
why3,
|
|
}:
|
|
provers:
|
|
let
|
|
configAwkScript = runCommand "why3-conf.awk" { inherit provers; } ''
|
|
for p in $provers; do
|
|
for b in $p/bin/*; do
|
|
BASENAME=$(basename $b)
|
|
echo "/^command =/{ gsub(\"$BASENAME\", \"$b\") }" >> $out
|
|
done
|
|
done
|
|
echo '{ print }' >> $out
|
|
'';
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "${why3.pname}-with-provers";
|
|
version = why3.version;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ why3 ] ++ provers;
|
|
|
|
dontUnpack = true;
|
|
|
|
buildPhase = ''
|
|
mkdir -p $out/share/why3/
|
|
why3 config detect -C $out/share/why3/why3.conf
|
|
awk -i inplace -f ${configAwkScript} $out/share/why3/why3.conf
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
makeWrapper ${why3}/bin/why3 $out/bin/why3 --add-flags "--config $out/share/why3/why3.conf"
|
|
'';
|
|
}
|