nixpkgs/pkgs/by-name/st/stp/package.nix

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

72 lines
1.6 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, cmake
, boost
, bison
, flex
, fetchFromGitHub
, fetchpatch
, perl
, python3
, zlib
, minisat
, cryptominisat
}:
2017-05-14 08:55:19 +00:00
stdenv.mkDerivation rec {
2019-08-26 21:00:48 +00:00
pname = "stp";
version = "2.3.3";
2017-05-14 08:55:19 +00:00
src = fetchFromGitHub {
owner = "stp";
repo = "stp";
rev = version;
hash = "sha256-B+HQF4TJPkYrpodE4qo4JHvlu+a5HTJf1AFyXTnZ4vk=";
};
2024-02-13 07:21:09 +00:00
patches = [
# Fix missing type declaration
# due to undeterminisitic compilation
# of circularly dependent headers
./stdint.patch
# Python 3.12+ compatibility for build: https://github.com/stp/stp/pull/450
(fetchpatch {
url = "https://github.com/stp/stp/commit/fb185479e760b6ff163512cb6c30ac9561aadc0e.patch";
hash = "sha256-guFgeWOrxRrxkU7kMvd5+nmML0rwLYW196m1usE2qiA=";
})
2024-02-13 07:21:09 +00:00
];
2017-05-14 08:55:19 +00:00
postPatch = ''
# Upstream fix for gcc-13 support:
# https://github.com/stp/stp/pull/462
# Can't apply it as is as patch context changed in ither patches.
# TODO: remove me on 2.4 release
sed -e '1i #include <cstdint>' -i include/stp/AST/ASTNode.h
'';
buildInputs = [
boost
zlib
minisat
cryptominisat
python3
];
2017-05-14 08:55:19 +00:00
nativeBuildInputs = [ cmake bison flex perl ];
preConfigure = ''
python_install_dir=$out/${python3.sitePackages}
2017-05-14 08:55:19 +00:00
mkdir -p $python_install_dir
cmakeFlagsArray=(
$cmakeFlagsArray
"-DBUILD_SHARED_LIBS=ON"
"-DPYTHON_LIB_INSTALL_DIR=$python_install_dir"
)
'';
2017-05-14 08:55:19 +00:00
meta = with lib; {
2017-05-14 08:55:19 +00:00
description = "Simple Theorem Prover";
2024-07-14 06:57:01 +00:00
maintainers = with maintainers; [ McSinyx numinit ];
2017-05-14 08:55:19 +00:00
platforms = platforms.linux;
license = licenses.mit;
};
}