Skip to content

Commit

Permalink
prover9: fix build on GCC 14
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzjunior committed Feb 23, 2025
1 parent a94dbc9 commit 17d68c2
Showing 1 changed file with 34 additions and 10 deletions.
44 changes: 34 additions & 10 deletions pkgs/by-name/pr/prover9/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
lib,
stdenv,
fetchurl,
versionCheckHook,
}:

stdenv.mkDerivation {
pname = "prover9";
version = "2009-11a";
version = "2009-11A";

src = fetchurl {
url = "https://www.cs.unm.edu/~mccune/mace4/download/LADR-2009-11A.tar.gz";
sha256 = "1l2i3d3h5z7nnbzilb6z92r0rbx0kh6yaxn2c5qhn3000xcfsay3";
hash = "sha256-wyvtWAcADAtxYcJ25Q2coK8MskjfLBr/svb8AkcbUdA=";
};

hardeningDisable = [ "format" ];
Expand All @@ -20,31 +21,54 @@ stdenv.mkDerivation {
MV=$(type -tp mv)
CP=$(type -tp cp)
for f in Makefile */Makefile; do
substituteInPlace $f --replace "/bin/rm" "$RM" \
--replace "/bin/mv" "$MV" \
--replace "/bin/cp" "$CP";
substituteInPlace $f --replace-quiet "/bin/rm" "$RM" \
--replace-quiet "/bin/mv" "$MV" \
--replace-quiet "/bin/cp" "$CP";
done
'';

buildFlags = [ "all" ];

checkPhase = "make test1";
# Fails the build on clang-16 and gcc-14.
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-int";

doCheck = true;
checkPhase = ''
runHook preCheck
make test1
make test2
make test3
runHook postCheck
'';

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/* $out/bin
for f in mace4 prover9 fof-prover9 autosketches4 newauto newsax ladr_to_tptp tptp_to_ladr; do
install -Dm555 bin/$f $out/bin/$f;
done
install -Dm644 -t $out/share/man/man1 manpages/*.1
runHook postInstall
'';

meta = with lib; {
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;

meta = {
homepage = "https://www.cs.unm.edu/~mccune/mace4/";
license = licenses.gpl2Only;
license = lib.licenses.gpl2Only;
description = "Automated theorem prover for first-order and equational logic";
longDescription = ''
Prover9 is a resolution/paramodulation automated theorem prover
for first-order and equational logic. Prover9 is a successor of
the Otter Prover. This is the LADR command-line version.
'';
platforms = platforms.linux;
mainProgram = "prover9";
platforms = lib.platforms.linux;
maintainers = [ ];
};
}

0 comments on commit 17d68c2

Please sign in to comment.