Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stp: fix setuptools dependency #327037

Merged
merged 2 commits into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions pkgs/applications/science/logic/stp/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
{ lib, stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl
, python3, python3Packages, zlib, minisat, cryptominisat }:
{ lib
, stdenv
, cmake
, boost
, bison
, flex
, fetchFromGitHub
, fetchpatch
, perl
, python3
, zlib
, minisat
, cryptominisat
}:

stdenv.mkDerivation rec {
pname = "stp";
Expand All @@ -8,14 +20,20 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = "stp";
repo = "stp";
rev = version;
sha256 = "1yg2v4wmswh1sigk47drwsxyayr472mf4i47lqmlcgn9hhbx1q87";
rev = version;
hash = "sha256-B+HQF4TJPkYrpodE4qo4JHvlu+a5HTJf1AFyXTnZ4vk=";
};
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=";
})
];

postPatch = ''
Expand All @@ -26,10 +44,16 @@ stdenv.mkDerivation rec {
sed -e '1i #include <cstdint>' -i include/stp/AST/ASTNode.h
'';

buildInputs = [ boost zlib minisat cryptominisat python3 ];
buildInputs = [
boost
zlib
minisat
cryptominisat
python3
];
nativeBuildInputs = [ cmake bison flex perl ];
preConfigure = ''
python_install_dir=$out/${python3Packages.python.sitePackages}
python_install_dir=$out/${python3.sitePackages}
mkdir -p $python_install_dir
cmakeFlagsArray=(
$cmakeFlagsArray
Expand All @@ -40,7 +64,7 @@ stdenv.mkDerivation rec {

meta = with lib; {
description = "Simple Theorem Prover";
maintainers = with maintainers; [ McSinyx ];
maintainers = with maintainers; [ McSinyx numinit ];
platforms = platforms.linux;
license = licenses.mit;
};
Expand Down