mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-05 03:34:12 +00:00
stp: patch out use of distutils.sysconfig
This is fully removed in Python 3.12 and should be replaced with sysconfig.get_path('purelib').
This commit is contained in:
parent
7a5ca79479
commit
894f94a26b
@ -1,5 +1,17 @@
|
|||||||
{ lib, stdenv, cmake, boost, bison, flex, fetchFromGitHub, perl
|
{ lib
|
||||||
, python3, python3Packages, zlib, minisat, cryptominisat }:
|
, stdenv
|
||||||
|
, cmake
|
||||||
|
, boost
|
||||||
|
, bison
|
||||||
|
, flex
|
||||||
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
|
, perl
|
||||||
|
, python3
|
||||||
|
, zlib
|
||||||
|
, minisat
|
||||||
|
, cryptominisat
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "stp";
|
pname = "stp";
|
||||||
@ -9,13 +21,19 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "stp";
|
owner = "stp";
|
||||||
repo = "stp";
|
repo = "stp";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1yg2v4wmswh1sigk47drwsxyayr472mf4i47lqmlcgn9hhbx1q87";
|
hash = "sha256-B+HQF4TJPkYrpodE4qo4JHvlu+a5HTJf1AFyXTnZ4vk=";
|
||||||
};
|
};
|
||||||
patches = [
|
patches = [
|
||||||
# Fix missing type declaration
|
# Fix missing type declaration
|
||||||
# due to undeterminisitic compilation
|
# due to undeterminisitic compilation
|
||||||
# of circularly dependent headers
|
# of circularly dependent headers
|
||||||
./stdint.patch
|
./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 = ''
|
postPatch = ''
|
||||||
@ -26,10 +44,16 @@ stdenv.mkDerivation rec {
|
|||||||
sed -e '1i #include <cstdint>' -i include/stp/AST/ASTNode.h
|
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 ];
|
nativeBuildInputs = [ cmake bison flex perl ];
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
python_install_dir=$out/${python3Packages.python.sitePackages}
|
python_install_dir=$out/${python3.sitePackages}
|
||||||
mkdir -p $python_install_dir
|
mkdir -p $python_install_dir
|
||||||
cmakeFlagsArray=(
|
cmakeFlagsArray=(
|
||||||
$cmakeFlagsArray
|
$cmakeFlagsArray
|
||||||
|
Loading…
Reference in New Issue
Block a user