From 3628d0d8938ddca22f5ca5f999eae321b6657329 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 8 Jul 2020 04:51:18 +0000 Subject: [PATCH 1/3] cryptominisat: 5.7.1 -> 5.8.0 --- pkgs/applications/science/logic/cryptominisat/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/cryptominisat/default.nix b/pkgs/applications/science/logic/cryptominisat/default.nix index 591b04ab062..20f266ec257 100644 --- a/pkgs/applications/science/logic/cryptominisat/default.nix +++ b/pkgs/applications/science/logic/cryptominisat/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "cryptominisat"; - version = "5.7.1"; + version = "5.8.0"; src = fetchFromGitHub { owner = "msoos"; repo = "cryptominisat"; rev = version; - sha256 = "16lydnbd4rxfyabvvw7l4hbbby3yprcqqzrydd3n8rjbxibi4xyf"; + sha256 = "00hmxdlyhn7pwk9jlvc5g0l5z5xqfchjzf5jgn3pkj9xhl8yqq50"; }; buildInputs = [ python3 boost ]; From e3d703bb921c482add5d6bd633990a00b729ccc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 9 Jul 2020 08:11:28 +0100 Subject: [PATCH 2/3] cryptominisat: fix build on darwin --- .../0001-fix-build-on-Nix-macOS.patch | 29 +++++++++++++++++++ .../science/logic/cryptominisat/default.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch diff --git a/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch b/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch new file mode 100644 index 00000000000..cbc30f83270 --- /dev/null +++ b/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch @@ -0,0 +1,29 @@ +From b1bfa51c4032b4eedc61b536c852b6ff2a295f07 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= +Date: Thu, 9 Jul 2020 08:08:25 +0100 +Subject: [PATCH] fix build on Nix/macOS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Thalheim +--- + python/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt +index f549ca7..5a23f25 100644 +--- a/python/CMakeLists.txt ++++ b/python/CMakeLists.txt +@@ -77,7 +77,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + ARGS setup.py build_ext --inplace + DEPENDS cryptominisat5 + ) +-elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ++elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT DEFINED ENV{NIX_CC}) + execute_process(COMMAND xcrun --show-sdk-path + OUTPUT_VARIABLE PY_OSX_SDK_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE) +-- +2.24.3 (Apple Git-128) + diff --git a/pkgs/applications/science/logic/cryptominisat/default.nix b/pkgs/applications/science/logic/cryptominisat/default.nix index 20f266ec257..d801d3fb896 100644 --- a/pkgs/applications/science/logic/cryptominisat/default.nix +++ b/pkgs/applications/science/logic/cryptominisat/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { sha256 = "00hmxdlyhn7pwk9jlvc5g0l5z5xqfchjzf5jgn3pkj9xhl8yqq50"; }; + patches = [ ./0001-fix-build-on-Nix-macOS.patch ]; + buildInputs = [ python3 boost ]; nativeBuildInputs = [ cmake xxd ]; From 223c91d03253890b59c56dfb1363c0f968d41f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 9 Jul 2020 08:21:21 +0100 Subject: [PATCH 3/3] cryptominisat: use fetchpatch --- .../0001-fix-build-on-Nix-macOS.patch | 29 ------------------- .../science/logic/cryptominisat/default.nix | 10 +++++-- 2 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch diff --git a/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch b/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch deleted file mode 100644 index cbc30f83270..00000000000 --- a/pkgs/applications/science/logic/cryptominisat/0001-fix-build-on-Nix-macOS.patch +++ /dev/null @@ -1,29 +0,0 @@ -From b1bfa51c4032b4eedc61b536c852b6ff2a295f07 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Thu, 9 Jul 2020 08:08:25 +0100 -Subject: [PATCH] fix build on Nix/macOS -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim ---- - python/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt -index f549ca7..5a23f25 100644 ---- a/python/CMakeLists.txt -+++ b/python/CMakeLists.txt -@@ -77,7 +77,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") - ARGS setup.py build_ext --inplace - DEPENDS cryptominisat5 - ) --elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") -+elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT DEFINED ENV{NIX_CC}) - execute_process(COMMAND xcrun --show-sdk-path - OUTPUT_VARIABLE PY_OSX_SDK_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE) --- -2.24.3 (Apple Git-128) - diff --git a/pkgs/applications/science/logic/cryptominisat/default.nix b/pkgs/applications/science/logic/cryptominisat/default.nix index d801d3fb896..ddbb140c9ba 100644 --- a/pkgs/applications/science/logic/cryptominisat/default.nix +++ b/pkgs/applications/science/logic/cryptominisat/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, python3, xxd, boost }: +{ stdenv, fetchFromGitHub, cmake, python3, xxd, boost, fetchpatch }: stdenv.mkDerivation rec { pname = "cryptominisat"; @@ -11,7 +11,13 @@ stdenv.mkDerivation rec { sha256 = "00hmxdlyhn7pwk9jlvc5g0l5z5xqfchjzf5jgn3pkj9xhl8yqq50"; }; - patches = [ ./0001-fix-build-on-Nix-macOS.patch ]; + patches = [ + (fetchpatch { + # https://github.com/msoos/cryptominisat/pull/621 + url = "https://github.com/msoos/cryptominisat/commit/11a97003b0bfbfb61ed6c4e640212110d390c28c.patch"; + sha256 = "0hdy345bwcbxz0jl1jdxfa6mmfh77s2pz9rnncsr0jzk11b3j0cw"; + }) + ]; buildInputs = [ python3 boost ]; nativeBuildInputs = [ cmake xxd ];