From 3815d32010dc57a97fe8f6071a07c73aab7fd824 Mon Sep 17 00:00:00 2001 From: Lein Matsumaru Date: Mon, 9 Aug 2021 16:43:27 +0000 Subject: [PATCH] ethminer: fix global-context --- .../misc/ethminer/add-global-context.patch | 25 +++++++++++++++++++ pkgs/tools/misc/ethminer/default.nix | 5 ++++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/misc/ethminer/add-global-context.patch diff --git a/pkgs/tools/misc/ethminer/add-global-context.patch b/pkgs/tools/misc/ethminer/add-global-context.patch new file mode 100644 index 000000000000..f0891e5a2758 --- /dev/null +++ b/pkgs/tools/misc/ethminer/add-global-context.patch @@ -0,0 +1,25 @@ +diff --git a/libethcore/CMakeLists.txt b/libethcore/CMakeLists.txt +index 1a53de8..832e926 100644 +--- a/libethcore/CMakeLists.txt ++++ b/libethcore/CMakeLists.txt +@@ -7,7 +7,7 @@ set(SOURCES + include_directories(BEFORE ..) + + add_library(ethcore ${SOURCES}) +-target_link_libraries(ethcore PUBLIC devcore ethash::ethash PRIVATE hwmon) ++target_link_libraries(ethcore PUBLIC devcore ethash::ethash ethash-global-context PRIVATE hwmon) + + if(ETHASHCL) + target_link_libraries(ethcore PRIVATE ethash-cl) +diff --git a/libethcore/EthashAux.h b/libethcore/EthashAux.h +index d9aadc7..fe5c6cf 100644 +--- a/libethcore/EthashAux.h ++++ b/libethcore/EthashAux.h +@@ -22,6 +22,7 @@ + #include + + #include ++#include + + namespace dev + { diff --git a/pkgs/tools/misc/ethminer/default.nix b/pkgs/tools/misc/ethminer/default.nix index 675147bc5d57..e159622bc8e1 100644 --- a/pkgs/tools/misc/ethminer/default.nix +++ b/pkgs/tools/misc/ethminer/default.nix @@ -64,6 +64,11 @@ stdenv.mkDerivation rec { cudatoolkit ]; + patches = [ + # global context library is separated from libethash + ./add-global-context.patch + ]; + preConfigure = '' sed -i 's/_lib_static//' libpoolprotocols/CMakeLists.txt '';