From 1852b4755ff81bf926397ec99af068cfce83187a Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 11 Jul 2024 18:14:44 +0100 Subject: [PATCH 1/5] monero-cli: build with Ninja (cherry picked from commit 0539f86a556de1a58832905e2a7a048435f56104) --- pkgs/applications/blockchains/monero-cli/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 8f2f3b850125..6a0a0218fb79 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, pkg-config +{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config , boost, miniupnpc, openssl, unbound , zeromq, pcsclite, readline, libsodium, hidapi , randomx, rapidjson @@ -47,7 +47,7 @@ stdenv.mkDerivation rec { cp -r . $source ''; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ cmake ninja pkg-config ]; buildInputs = [ boost miniupnpc openssl unbound From c7916870d9e66407505123a108b71cd09b94c863 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 11 Jul 2024 18:14:44 +0100 Subject: [PATCH 2/5] monero-cli: add patch for miniupnpc 2.2.8 (cherry picked from commit 497259f95bc1be10883462717358f7f7eee971d0) --- .../blockchains/monero-cli/default.nix | 24 ++++++++++- .../monero-cli/use-system-libraries.patch | 42 +++++++------------ 2 files changed, 37 insertions(+), 29 deletions(-) diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 6a0a0218fb79..50d5d1b109a3 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, cmake, ninja, pkg-config +{ lib, stdenv, fetchFromGitHub, fetchpatch2, cmake, ninja, pkg-config , boost, miniupnpc, openssl, unbound , zeromq, pcsclite, readline, libsodium, hidapi , randomx, rapidjson @@ -35,6 +35,28 @@ stdenv.mkDerivation rec { }; patches = [ + # cmake: remove unused/extera cmake/FindMiniupnpc.cmake and only rely on external/miniupnpc + # https://github.com/monero-project/monero/pull/9366 + (fetchpatch2 { + url = "https://github.com/monero-project/monero/commit/5074a543a49f7e23fb39b6462fd4c4c9741c3693.patch?full_index=1"; + hash = "sha256-dS2hhEU6m2of0ULlsf+/tZMHUmq3vGGXJPGHvtnpQnY="; + }) + + # cmake: add different parameters to add_monero_library. + # https://github.com/monero-project/monero/pull/9367 + (fetchpatch2 { + url = "https://github.com/monero-project/monero/commit/b91ead90254ac6d6daf908f689c38e372a44c615.patch?full_index=1"; + hash = "sha256-DL2YqkvEONbeEDqLOAo2eSF5JF5gOzKcLKeNlUXBY1w="; + }) + + # external: update miniupnpc to 2.2.8 + # https://github.com/monero-project/monero/pull/9367 + (fetchpatch2 { + url = "https://github.com/monero-project/monero/commit/d81da086ec5088a04b3f7b34831e72910300e2f7.patch?full_index=1"; + hash = "sha256-ZJGiDMk5DMmEXwzoUYPC+DIoebluFh54kMQtQU78ckI="; + excludes = [ "external/miniupnp" ]; + }) + ./use-system-libraries.patch ]; diff --git a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch index 5d3e3561d554..f8629d47553c 100644 --- a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch +++ b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch @@ -1,14 +1,14 @@ diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index 5b7f69a56..5536debe8 100644 +index f8b834ac17...520e148428 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt -@@ -36,22 +36,9 @@ - # others. +@@ -39,23 +39,12 @@ + add_compile_options(-D_GNU_SOURCE) + endif() - find_package(Miniupnpc REQUIRED) -- -message(STATUS "Using in-tree miniupnpc") -set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) +-set(UPNPC_BUILD_TESTS FALSE CACHE BOOL "Disable miniupnp internal tests." FORCE) -add_subdirectory(miniupnp/miniupnpc) -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") -set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -20,33 +20,19 @@ index 5b7f69a56..5536debe8 100644 -if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE") -endif() -- --set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) -+set(UPNP_STATIC false PARENT_SCOPE) -+set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE) -+set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE) ++include(FindPkgConfig) ++pkg_check_modules(MINIUPNPC REQUIRED IMPORTED_TARGET GLOBAL miniupnpc) ++get_target_property(MINIUPNPC_INCLUDE_DIR PkgConfig::MINIUPNPC INTERFACE_INCLUDE_DIRECTORIES) ++set_target_properties(PkgConfig::MINIUPNPC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}/miniupnpc") ++set(UPNP_LIBRARIES PkgConfig::MINIUPNPC PARENT_SCOPE) +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) +- find_package(Unbound) -@@ -69,4 +56,3 @@ endif() + if(NOT UNBOUND_INCLUDE_DIR) +@@ -72,4 +61,3 @@ add_subdirectory(db_drivers) add_subdirectory(easylogging++) add_subdirectory(qrcodegen) -add_subdirectory(randomx EXCLUDE_FROM_ALL) -diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl -index d4b39869c..13071d898 100644 ---- a/src/p2p/net_node.inl -+++ b/src/p2p/net_node.inl -@@ -61,9 +61,9 @@ - #include "cryptonote_core/cryptonote_core.h" - #include "net/parse.h" - --#include --#include --#include -+#include -+#include -+#include - - #undef MONERO_DEFAULT_LOG_CATEGORY - #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" From 54d0213c00a0e94d62849710785543e2b7241be7 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Mon, 9 Sep 2024 02:41:40 +0200 Subject: [PATCH 3/5] monero-{cli,gui}: 0.18.3.3 -> 0.18.3.4 Also: - Remove unnecessary dependencies - Fix trezor support - Format using nixfmt (cherry picked from commit 473b09f778493fbba693ac6ccb17df8a7c3ab016) --- .../blockchains/monero-cli/default.nix | 128 +++++++++++------- .../monero-cli/use-system-libraries.patch | 66 +++++++-- .../blockchains/monero-gui/default.nix | 116 +++++++++++----- pkgs/top-level/all-packages.nix | 2 +- 4 files changed, 212 insertions(+), 100 deletions(-) diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 50d5d1b109a3..98b9deb79222 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -1,9 +1,30 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch2, cmake, ninja, pkg-config -, boost, miniupnpc, openssl, unbound -, zeromq, pcsclite, readline, libsodium, hidapi -, randomx, rapidjson -, CoreData, IOKit, PCSC -, trezorSupport ? true, libusb1, protobuf, python3 +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + ninja, + pkg-config, + boost, + libsodium, + miniupnpc, + openssl, + python3, + randomx, + rapidjson, + readline, + unbound, + zeromq, + + # darwin + CoreData, + IOKit, + + trezorSupport ? true, + hidapi, + libusb1, + protobuf_21, + udev, }: let @@ -25,40 +46,16 @@ in stdenv.mkDerivation rec { pname = "monero-cli"; - version = "0.18.3.3"; + version = "0.18.3.4"; src = fetchFromGitHub { owner = "monero-project"; repo = "monero"; rev = "v${version}"; - hash = "sha256-1LkKIrud317BEE+713t5wiJV6FcDlJdj4ypXPR0bKTs="; + hash = "sha256-nDiFJjhsISYM8kTgJUaPYL44iyccnz5+Pd5beBh+lsM="; }; - patches = [ - # cmake: remove unused/extera cmake/FindMiniupnpc.cmake and only rely on external/miniupnpc - # https://github.com/monero-project/monero/pull/9366 - (fetchpatch2 { - url = "https://github.com/monero-project/monero/commit/5074a543a49f7e23fb39b6462fd4c4c9741c3693.patch?full_index=1"; - hash = "sha256-dS2hhEU6m2of0ULlsf+/tZMHUmq3vGGXJPGHvtnpQnY="; - }) - - # cmake: add different parameters to add_monero_library. - # https://github.com/monero-project/monero/pull/9367 - (fetchpatch2 { - url = "https://github.com/monero-project/monero/commit/b91ead90254ac6d6daf908f689c38e372a44c615.patch?full_index=1"; - hash = "sha256-DL2YqkvEONbeEDqLOAo2eSF5JF5gOzKcLKeNlUXBY1w="; - }) - - # external: update miniupnpc to 2.2.8 - # https://github.com/monero-project/monero/pull/9367 - (fetchpatch2 { - url = "https://github.com/monero-project/monero/commit/d81da086ec5088a04b3f7b34831e72910300e2f7.patch?full_index=1"; - hash = "sha256-ZJGiDMk5DMmEXwzoUYPC+DIoebluFh54kMQtQU78ckI="; - excludes = [ "external/miniupnp" ]; - }) - - ./use-system-libraries.patch - ]; + patches = [ ./use-system-libraries.patch ]; postPatch = '' # manually install submodules @@ -69,31 +66,58 @@ stdenv.mkDerivation rec { cp -r . $source ''; - nativeBuildInputs = [ cmake ninja pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; - buildInputs = [ - boost miniupnpc openssl unbound - zeromq pcsclite readline - libsodium hidapi randomx rapidjson - protobuf - ] ++ lib.optionals stdenv.isDarwin [ IOKit CoreData PCSC ] - ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ]; + buildInputs = + [ + boost + libsodium + miniupnpc + openssl + randomx + rapidjson + readline + unbound + zeromq + ] + ++ lib.optionals stdenv.isDarwin [ + IOKit + CoreData + ] + ++ lib.optionals trezorSupport [ + python3 + hidapi + libusb1 + protobuf_21 + udev + ]; - cmakeFlags = [ - "-DUSE_DEVICE_TREZOR=ON" - "-DBUILD_GUI_DEPS=ON" - "-DReadline_ROOT_DIR=${readline.dev}" - "-DRandomX_ROOT_DIR=${randomx}" - ] ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF"; + cmakeFlags = + [ + # skip submodules init + "-DMANUAL_SUBMODULES=ON" + # required by monero-gui + "-DBUILD_GUI_DEPS=ON" + "-DReadline_ROOT_DIR=${readline.dev}" + ] + ++ lib.optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF" + ++ lib.optional trezorSupport [ + "-DUSE_DEVICE_TREZOR=ON" + # fix build on recent gcc versions + "-DCMAKE_CXX_FLAGS=-fpermissive" + ]; outputs = [ "out" "source" ]; - meta = with lib; { + meta = { description = "Private, secure, untraceable currency"; - homepage = "https://getmonero.org/"; - license = licenses.bsd3; - platforms = platforms.all; - maintainers = with maintainers; [ rnhmjoj ]; + homepage = "https://getmonero.org/"; + license = lib.licenses.bsd3; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ rnhmjoj ]; mainProgram = "monero-wallet-cli"; }; } diff --git a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch index f8629d47553c..adb41fb4ac25 100644 --- a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch +++ b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch @@ -1,14 +1,15 @@ diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt -index f8b834ac17...520e148428 100644 +index 5b7f69a56..cc4b0a346 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt -@@ -39,23 +39,12 @@ - add_compile_options(-D_GNU_SOURCE) - endif() +@@ -35,25 +35,14 @@ + # ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with + # others. +-find_package(Miniupnpc REQUIRED) +- -message(STATUS "Using in-tree miniupnpc") -set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE) --set(UPNPC_BUILD_TESTS FALSE CACHE BOOL "Disable miniupnp internal tests." FORCE) -add_subdirectory(miniupnp/miniupnpc) -set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external") -set_property(TARGET libminiupnpc-static PROPERTY POSITION_INDEPENDENT_CODE ON) @@ -20,19 +21,58 @@ index f8b834ac17...520e148428 100644 -if(CMAKE_SYSTEM_NAME MATCHES "NetBSD") - set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -D_NETBSD_SOURCE") -endif() -+include(FindPkgConfig) -+pkg_check_modules(MINIUPNPC REQUIRED IMPORTED_TARGET GLOBAL miniupnpc) -+get_target_property(MINIUPNPC_INCLUDE_DIR PkgConfig::MINIUPNPC INTERFACE_INCLUDE_DIRECTORIES) -+set_target_properties(PkgConfig::MINIUPNPC PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${MINIUPNPC_INCLUDE_DIR}/miniupnpc") -+set(UPNP_LIBRARIES PkgConfig::MINIUPNPC PARENT_SCOPE) - --set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) - +-set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE) ++find_package(PkgConfig REQUIRED) ++pkg_check_modules(MINIUPNPC REQUIRED miniupnpc) ++link_libraries(${MINIUPNPC_LIBRARIES}) ++include_directories(${MINIUPNPC_INCLUDE_DIRS}) + ++find_package(RapidJSON) find_package(Unbound) ++find_library(RANDOMX_LIBRARY randomx) if(NOT UNBOUND_INCLUDE_DIR) -@@ -72,4 +61,3 @@ + die("Could not find libunbound") +@@ -69,4 +58,3 @@ endif() add_subdirectory(db_drivers) add_subdirectory(easylogging++) add_subdirectory(qrcodegen) -add_subdirectory(randomx EXCLUDE_FROM_ALL) +diff --git a/src/p2p/net_node.inl b/src/p2p/net_node.inl +index 71f5393e8..bb48083d0 100644 +--- a/src/p2p/net_node.inl ++++ b/src/p2p/net_node.inl +@@ -60,9 +60,9 @@ + #include "cryptonote_core/cryptonote_core.h" + #include "net/parse.h" + +-#include +-#include +-#include ++#include ++#include ++#include + + #undef MONERO_DEFAULT_LOG_CATEGORY + #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" +@@ -2989,7 +2989,8 @@ namespace nodetool + UPNPUrls urls; + IGDdatas igdData; + char lanAddress[64]; +- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); ++ char wanAddress[64]; ++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); + freeUPNPDevlist(deviceList); + if (result > 0) { + if (result == 1) { +@@ -3057,7 +3058,8 @@ namespace nodetool + UPNPUrls urls; + IGDdatas igdData; + char lanAddress[64]; +- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); ++ char wanAddress[64]; ++ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); + freeUPNPDevlist(deviceList); + if (result > 0) { + if (result == 1) { diff --git a/pkgs/applications/blockchains/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix index d72cad5c5367..d4495a4a9b34 100644 --- a/pkgs/applications/blockchains/monero-gui/default.nix +++ b/pkgs/applications/blockchains/monero-gui/default.nix @@ -1,43 +1,86 @@ -{ lib, stdenv, wrapQtAppsHook, makeDesktopItem -, fetchFromGitHub -, cmake, qttools, pkg-config -, qtbase, qtdeclarative, qtgraphicaleffects -, qtmultimedia, qtxmlpatterns -, qtquickcontrols, qtquickcontrols2 -, qtmacextras -, monero-cli, miniupnpc, unbound, readline -, boost, libunwind, libsodium, pcsclite -, randomx, zeromq, libgcrypt, libgpg-error -, hidapi, rapidjson, quirc -, trezorSupport ? true, libusb1, protobuf, python3 +{ + lib, + fetchFromGitHub, + makeDesktopItem, + boost, + cmake, + libgcrypt, + libgpg-error, + libsodium, + miniupnpc, + monero-cli, + pkg-config, + qtbase, + qtdeclarative, + qtgraphicaleffects, + qtmacextras, + qtmultimedia, + qtquickcontrols, + qtquickcontrols2, + qttools, + qtxmlpatterns, + quirc, + randomx, + rapidjson, + stdenv, + unbound, + wrapQtAppsHook, + zeromq, + + trezorSupport ? true, + hidapi, + libusb1, + protobuf_21, + python3, + udev, }: stdenv.mkDerivation rec { pname = "monero-gui"; - version = "0.18.3.3"; + version = "0.18.3.4"; src = fetchFromGitHub { owner = "monero-project"; repo = "monero-gui"; rev = "v${version}"; - hash = "sha256-6qadBm4bPui11OVY1tLFcHsfswXWBFiJvutIsF6EfX8="; + hash = "sha256-wnU24EmZig2W/psy4OhaQVy2WwR0CgljlyYwOg4bzwM="; }; nativeBuildInputs = [ - cmake pkg-config wrapQtAppsHook + cmake + pkg-config + wrapQtAppsHook (lib.getDev qttools) ]; - buildInputs = [ - qtbase qtdeclarative qtgraphicaleffects - qtmultimedia qtquickcontrols qtquickcontrols2 - qtxmlpatterns - monero-cli miniupnpc unbound readline - randomx libgcrypt libgpg-error - boost libunwind libsodium pcsclite - zeromq hidapi rapidjson quirc - ] ++ lib.optionals trezorSupport [ libusb1 protobuf python3 ] - ++ lib.optionals stdenv.isDarwin [ qtmacextras ]; + buildInputs = + [ + boost + libgcrypt + libgpg-error + libsodium + miniupnpc + qtbase + qtdeclarative + qtgraphicaleffects + qtmultimedia + qtquickcontrols + qtquickcontrols2 + qtxmlpatterns + quirc + randomx + rapidjson + unbound + zeromq + ] + ++ lib.optionals stdenv.isDarwin [ qtmacextras ] + ++ lib.optionals trezorSupport [ + hidapi + libusb1 + protobuf_21 + python3 + udev + ]; postUnpack = '' # copy monero sources here @@ -68,7 +111,12 @@ stdenv.mkDerivation rec { --replace 'add_subdirectory(external)' "" ''; - cmakeFlags = [ "-DARCH=default" ]; + cmakeFlags = + [ "-DARCH=default" ] + ++ lib.optional trezorSupport [ + # fix build on recent gcc versions + "-DCMAKE_CXX_FLAGS=-fpermissive" + ]; desktopItem = makeDesktopItem { name = "monero-wallet-gui"; @@ -76,7 +124,7 @@ stdenv.mkDerivation rec { icon = "monero"; desktopName = "Monero"; genericName = "Wallet"; - categories = [ "Network" "Utility" ]; + categories = [ "Network" "Utility" ]; }; postInstall = '' @@ -93,12 +141,12 @@ stdenv.mkDerivation rec { done; ''; - meta = with lib; { - description = "Private, secure, untraceable currency"; - homepage = "https://getmonero.org/"; - license = licenses.bsd3; - platforms = platforms.all; - maintainers = with maintainers; [ rnhmjoj ]; - mainProgram = "monero-wallet-gui"; + meta = { + description = "Private, secure, untraceable currency"; + homepage = "https://getmonero.org/"; + license = lib.licenses.bsd3; + platforms = lib.platforms.all; + maintainers = with lib.maintainers; [ rnhmjoj ]; + mainProgram = "monero-wallet-gui"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7e35acd75d2e..89e8daa4d46c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36054,7 +36054,7 @@ with pkgs; lndmanage = callPackage ../applications/blockchains/lndmanage { }; monero-cli = callPackage ../applications/blockchains/monero-cli { - inherit (darwin.apple_sdk.frameworks) CoreData IOKit PCSC; + inherit (darwin.apple_sdk.frameworks) CoreData IOKit; }; haven-cli = callPackage ../applications/blockchains/haven-cli { From c08ed769d168efd1272c535220de447222403d6b Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 9 Sep 2024 11:41:02 +0200 Subject: [PATCH 4/5] monero-{cli,gui}: require udev only on Linux (cherry picked from commit 83a8e7428382eec13a4ecd940c265b5702181b2e) --- pkgs/applications/blockchains/monero-cli/default.nix | 2 ++ pkgs/applications/blockchains/monero-gui/default.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/applications/blockchains/monero-cli/default.nix b/pkgs/applications/blockchains/monero-cli/default.nix index 98b9deb79222..7a1069357278 100644 --- a/pkgs/applications/blockchains/monero-cli/default.nix +++ b/pkgs/applications/blockchains/monero-cli/default.nix @@ -92,6 +92,8 @@ stdenv.mkDerivation rec { hidapi libusb1 protobuf_21 + ] + ++ lib.optionals (trezorSupport && stdenv.isLinux) [ udev ]; diff --git a/pkgs/applications/blockchains/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix index d4495a4a9b34..7a8f5d4c26cb 100644 --- a/pkgs/applications/blockchains/monero-gui/default.nix +++ b/pkgs/applications/blockchains/monero-gui/default.nix @@ -79,6 +79,8 @@ stdenv.mkDerivation rec { libusb1 protobuf_21 python3 + ] + ++ lib.optionals (trezorSupport && stdenv.isLinux) [ udev ]; From 8d41e9160780b18ff9bda6ce039cd829d8ee47ab Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 9 Sep 2024 11:41:18 +0200 Subject: [PATCH 5/5] monero-cli: fix build with miniupnpc --- .../monero-cli/use-system-libraries.patch | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch index adb41fb4ac25..900c5dcfedc4 100644 --- a/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch +++ b/pkgs/applications/blockchains/monero-cli/use-system-libraries.patch @@ -56,23 +56,3 @@ index 71f5393e8..bb48083d0 100644 #undef MONERO_DEFAULT_LOG_CATEGORY #define MONERO_DEFAULT_LOG_CATEGORY "net.p2p" -@@ -2989,7 +2989,8 @@ namespace nodetool - UPNPUrls urls; - IGDdatas igdData; - char lanAddress[64]; -- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); -+ char wanAddress[64]; -+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); - freeUPNPDevlist(deviceList); - if (result > 0) { - if (result == 1) { -@@ -3057,7 +3058,8 @@ namespace nodetool - UPNPUrls urls; - IGDdatas igdData; - char lanAddress[64]; -- result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress); -+ char wanAddress[64]; -+ result = UPNP_GetValidIGD(deviceList, &urls, &igdData, lanAddress, sizeof lanAddress, wanAddress, sizeof wanAddress); - freeUPNPDevlist(deviceList); - if (result > 0) { - if (result == 1) {