nixpkgs/pkgs/applications/science/logic/satallax/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 lines
1.9 KiB
Nix
Raw Normal View History

2021-01-15 13:21:58 +00:00
{lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
2016-03-31 14:22:56 +00:00
stdenv.mkDerivation rec {
pname = "satallax";
2016-03-31 14:22:56 +00:00
version = "2.7";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ocaml zlib which eprover coq];
2016-03-31 14:22:56 +00:00
src = fetchurl {
url = "https://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${pname}-${version}.tar.gz";
2016-03-31 14:22:56 +00:00
sha256 = "1kvxn8mc35igk4vigi5cp7w3wpxk2z3bgwllfm4n3h2jfs0vkpib";
};
2020-03-05 04:16:49 +00:00
patches = [
# GCC9 doesn't allow default value in friend declaration.
./fix-declaration-gcc9.patch
];
2016-03-31 14:22:56 +00:00
preConfigure = ''
mkdir fake-tools
echo "echo 'Nix-build-host.localdomain'" > fake-tools/hostname
chmod a+x fake-tools/hostname
export PATH="$PATH:$PWD/fake-tools"
(
2016-03-31 14:22:56 +00:00
cd picosat-*
./configure
make
)
export PATH="$PATH:$PWD/libexec/satallax"
mkdir -p "$out/libexec/satallax"
cp picosat-*/picosat picosat-*/picomus "$out/libexec/satallax"
2021-01-15 13:21:58 +00:00
(
2016-03-31 14:22:56 +00:00
cd minisat
export MROOT=$PWD
cd core
make
cd ../simp
make
)
2016-03-31 14:22:56 +00:00
'';
2016-03-31 14:22:56 +00:00
postBuild = "echo testing; ! (bash ./test | grep ERROR)";
2016-03-31 14:22:56 +00:00
installPhase = ''
mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax"
cp bin/satallax.opt "$out/bin/satallax"
wrapProgram "$out/bin/satallax" \
2021-01-15 13:21:58 +00:00
--suffix PATH : "${lib.makeBinPath [ coq eprover ]}:$out/libexec/satallax" \
2016-03-31 14:22:56 +00:00
--add-flags "-M" --add-flags "$out/lib/satallax/modes"
2016-03-31 14:22:56 +00:00
cp LICENSE README "$out/share/doc/satallax"
2016-03-31 14:22:56 +00:00
cp bin/*.so "$out/lib"
2016-03-31 14:22:56 +00:00
cp -r modes "$out/lib/satallax/"
cp -r problems "$out/lib/satallax/"
cp -r coq* "$out/lib/satallax/"
'';
meta = {
description = "Automated theorem prover for higher-order logic";
2021-01-15 13:21:58 +00:00
license = lib.licenses.mit ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
2016-03-31 14:22:56 +00:00
downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/downloads.php";
homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/index.php";
};
2016-03-31 14:22:56 +00:00
}