Skip to content

Commit

Permalink
[24.05] monero-{cli,gui}: 0.18.3.3 -> 0.18.3.4 (#340721)
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak authored Sep 9, 2024
2 parents a4fef27 + 8d41e91 commit 7c243ea
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 74 deletions.
108 changes: 78 additions & 30 deletions pkgs/applications/blockchains/monero-cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,30 @@
{ lib, stdenv, fetchFromGitHub, cmake, 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
Expand All @@ -25,18 +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 = [
./use-system-libraries.patch
];
patches = [ ./use-system-libraries.patch ];

postPatch = ''
# manually install submodules
Expand All @@ -47,31 +66,60 @@ stdenv.mkDerivation rec {
cp -r . $source
'';

nativeBuildInputs = [ cmake 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
]
++ lib.optionals (trezorSupport && stdenv.isLinux) [
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";
};
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt
index 5b7f69a56..5536debe8 100644
index 5b7f69a56..cc4b0a346 100644
--- a/external/CMakeLists.txt
+++ b/external/CMakeLists.txt
@@ -36,22 +36,9 @@
@@ -35,25 +35,14 @@
# ...except for FreeBSD, because FreeBSD is a special case that doesn't play well with
# others.

find_package(Miniupnpc REQUIRED)
-find_package(Miniupnpc REQUIRED)
-
-message(STATUS "Using in-tree miniupnpc")
-set(UPNPC_NO_INSTALL TRUE CACHE BOOL "Disable miniupnp installation" FORCE)
Expand All @@ -22,22 +23,27 @@ index 5b7f69a56..5536debe8 100644
-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)
+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)

@@ -69,4 +56,3 @@ endif()
if(NOT UNBOUND_INCLUDE_DIR)
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 d4b39869c..13071d898 100644
index 71f5393e8..bb48083d0 100644
--- a/src/p2p/net_node.inl
+++ b/src/p2p/net_node.inl
@@ -61,9 +61,9 @@
@@ -60,9 +60,9 @@
#include "cryptonote_core/cryptonote_core.h"
#include "net/parse.h"

Expand Down
118 changes: 84 additions & 34 deletions pkgs/applications/blockchains/monero-gui/default.nix
Original file line number Diff line number Diff line change
@@ -1,43 +1,88 @@
{ 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
]
++ lib.optionals (trezorSupport && stdenv.isLinux) [
udev
];

postUnpack = ''
# copy monero sources here
Expand Down Expand Up @@ -68,15 +113,20 @@ 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";
exec = "monero-wallet-gui";
icon = "monero";
desktopName = "Monero";
genericName = "Wallet";
categories = [ "Network" "Utility" ];
categories = [ "Network" "Utility" ];
};

postInstall = ''
Expand All @@ -93,12 +143,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";
};
}
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7c243ea

Please sign in to comment.