From 894f94a26bacf95044cec17d2e96c66a30955a83 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sat, 13 Jul 2024 23:48:49 -0700 Subject: [PATCH 1/2] stp: patch out use of distutils.sysconfig This is fully removed in Python 3.12 and should be replaced with sysconfig.get_path('purelib'). --- .../science/logic/stp/default.nix | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix index fb41ea07f5a1..be36e484d276 100644 --- a/pkgs/applications/science/logic/stp/default.nix +++ b/pkgs/applications/science/logic/stp/default.nix @@ -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"; @@ -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 = '' @@ -26,10 +44,16 @@ stdenv.mkDerivation rec { sed -e '1i #include ' -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 From 6be4dbd223c2b34f92ccf0ea4a693d9fd9f20656 Mon Sep 17 00:00:00 2001 From: Morgan Jones Date: Sat, 13 Jul 2024 23:57:01 -0700 Subject: [PATCH 2/2] stp: add numinit as maintainer --- pkgs/applications/science/logic/stp/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/science/logic/stp/default.nix b/pkgs/applications/science/logic/stp/default.nix index be36e484d276..1025663b1bd7 100644 --- a/pkgs/applications/science/logic/stp/default.nix +++ b/pkgs/applications/science/logic/stp/default.nix @@ -64,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; };