From 17d68c235717c9ac7b49db6c4b27f62039394e25 Mon Sep 17 00:00:00 2001 From: Petr Zahradnik Date: Sat, 22 Feb 2025 21:53:09 +0100 Subject: [PATCH] prover9: fix build on GCC 14 --- pkgs/by-name/pr/prover9/package.nix | 44 ++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/pr/prover9/package.nix b/pkgs/by-name/pr/prover9/package.nix index ddf47d74d4cae..ca31f8d8c904f 100644 --- a/pkgs/by-name/pr/prover9/package.nix +++ b/pkgs/by-name/pr/prover9/package.nix @@ -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" ]; @@ -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 = [ ]; }; }