Merge pull request #209926 from wegank/satallax-darwin

satallax: add darwin support
This commit is contained in:
7c6f434c 2023-01-10 23:10:18 +00:00 committed by GitHub
commit a3e5e2db7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 9 deletions

View file

@ -1,10 +1,10 @@
{lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq}:
{ lib, stdenv, fetchurl, ocaml, zlib, which, eprover, makeWrapper, coq }:
stdenv.mkDerivation rec {
pname = "satallax";
version = "2.7";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ocaml zlib which eprover coq];
buildInputs = [ ocaml zlib which eprover coq ];
src = fetchurl {
url = "https://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${pname}-${version}.tar.gz";
sha256 = "1kvxn8mc35igk4vigi5cp7w3wpxk2z3bgwllfm4n3h2jfs0vkpib";
@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
./fix-declaration-gcc9.patch
];
prePatch = ''
patch -p1 -i ${../avy/minisat-fenv.patch} -d minisat
'';
preConfigure = ''
mkdir fake-tools
echo "echo 'Nix-build-host.localdomain'" > fake-tools/hostname
@ -41,7 +45,8 @@ stdenv.mkDerivation rec {
)
'';
postBuild = "echo testing; ! (bash ./test | grep ERROR)";
# error: invalid suffix on literal; C++11 requires a space between literal and identifier
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.isDarwin "-Wno-reserved-user-defined-literal";
installPhase = ''
mkdir -p "$out/share/doc/satallax" "$out/bin" "$out/lib" "$out/lib/satallax"
@ -59,11 +64,22 @@ stdenv.mkDerivation rec {
cp -r coq* "$out/lib/satallax/"
'';
doCheck = stdenv.isLinux;
checkPhase = ''
runHook preCheck
if bash ./test | grep ERROR; then
echo "Tests failed"
exit 1
fi
runHook postCheck
'';
meta = {
description = "Automated theorem prover for higher-order logic";
license = lib.licenses.mit ;
maintainers = [lib.maintainers.raskin];
platforms = lib.platforms.linux;
license = lib.licenses.mit;
maintainers = [ lib.maintainers.raskin ];
platforms = lib.platforms.unix;
downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/downloads.php";
homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/index.php";
};

View file

@ -36303,9 +36303,7 @@ with pkgs;
proverif = callPackage ../applications/science/logic/proverif { };
satallax = callPackage ../applications/science/logic/satallax {
ocaml = ocaml-ng.ocamlPackages_4_01_0.ocaml;
};
satallax = callPackage ../applications/science/logic/satallax { };
saw-tools = callPackage ../applications/science/logic/saw-tools {};