From 6545d1502070362b6b2490935fcc4a966acdfca2 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 31 Mar 2018 04:07:28 +0200 Subject: [PATCH 1/2] monero: cleanup --- pkgs/applications/altcoins/monero/default.nix | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/altcoins/monero/default.nix b/pkgs/applications/altcoins/monero/default.nix index 48932afaa0e2..85f5c2eb07c3 100644 --- a/pkgs/applications/altcoins/monero/default.nix +++ b/pkgs/applications/altcoins/monero/default.nix @@ -1,8 +1,13 @@ -{ stdenv, fetchpatch, fetchFromGitHub, cmake, pkgconfig, git -, boost, miniupnpc, openssl, unbound, cppzmq, zeromq, pcsclite -, readline, IOKit +{ stdenv, fetchFromGitHub, cmake, pkgconfig, git +, boost, miniupnpc, openssl, unbound, cppzmq +, zeromq, pcsclite, readline +, IOKit ? null }: +assert stdenv.isDarwin -> IOKit != null; + +with stdenv.lib; + stdenv.mkDerivation rec { name = "monero-${version}"; version = "0.12.0.0"; @@ -16,8 +21,10 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkgconfig git ]; - buildInputs = [ boost miniupnpc openssl unbound cppzmq zeromq pcsclite readline ] - ++ stdenv.lib.optional stdenv.isDarwin IOKit; + buildInputs = [ + boost miniupnpc openssl unbound + cppzmq zeromq pcsclite readline + ] ++ optional stdenv.isDarwin IOKit; cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" @@ -27,19 +34,11 @@ stdenv.mkDerivation rec { hardeningDisable = [ "fortify" ]; - installPhase = '' - make install - install -Dt "$out/bin/" \ - bin/monero-blockchain-export \ - bin/monero-blockchain-import \ - bin/monero-wallet-rpc - ''; - - meta = with stdenv.lib; { + meta = { description = "Private, secure, untraceable currency"; homepage = https://getmonero.org/; license = licenses.bsd3; platforms = platforms.all; - maintainers = [ maintainers.ehmry ]; + maintainers = with maintainers; [ ehmry rnhmjoj ]; }; } From e0fbaaa595951845163822c8df8a9f7942410b4e Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Sat, 31 Mar 2018 11:41:11 +0200 Subject: [PATCH 2/2] monero-gui: 0.11.1.0 -> 2018-03-31 --- .../altcoins/monero-gui/default.nix | 16 +++++----- .../altcoins/monero-gui/move-log-file.patch | 30 ++++++++----------- pkgs/top-level/all-packages.nix | 4 ++- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/pkgs/applications/altcoins/monero-gui/default.nix b/pkgs/applications/altcoins/monero-gui/default.nix index 0d2899b2e649..30bc0532d88f 100644 --- a/pkgs/applications/altcoins/monero-gui/default.nix +++ b/pkgs/applications/altcoins/monero-gui/default.nix @@ -2,32 +2,34 @@ , makeWrapper, makeDesktopItem , qtbase, qmake, qtmultimedia, qttools , qtgraphicaleffects, qtdeclarative -, qtlocation, qtquickcontrols, qtwebchannel +, qtlocation, qtquickcontrols2, qtwebchannel , qtwebengine, qtx11extras, qtxmlpatterns , monero, unbound, readline, boost, libunwind +, pcsclite, zeromq, cppzmq, pkgconfig }: with stdenv.lib; stdenv.mkDerivation rec { name = "monero-gui-${version}"; - version = "0.11.1.0"; + version = "2018-03-31"; src = fetchFromGitHub { owner = "monero-project"; repo = "monero-gui"; - rev = "v${version}"; - sha256 = "01d7apwrv8j8bh7plvvhlnll3ransaha3n6rx19nkgvfn319hswq"; + rev = "fbe5ba831795008361f4de4347e7ecb6d868b4eb"; + sha256 = "06cncwk4mxfw1rqwlwisasvangl73xyqwj4g6r9j85j5x4xy0k5s"; }; - nativeBuildInputs = [ qmake ]; + nativeBuildInputs = [ qmake pkgconfig ]; buildInputs = [ qtbase qtmultimedia qtgraphicaleffects - qtdeclarative qtlocation qtquickcontrols + qtdeclarative qtlocation qtquickcontrols2 qtwebchannel qtwebengine qtx11extras qtxmlpatterns monero unbound readline - boost libunwind makeWrapper + boost libunwind pcsclite zeromq cppzmq + makeWrapper ]; patches = [ diff --git a/pkgs/applications/altcoins/monero-gui/move-log-file.patch b/pkgs/applications/altcoins/monero-gui/move-log-file.patch index 928fb32911f5..08840c6a65e8 100644 --- a/pkgs/applications/altcoins/monero-gui/move-log-file.patch +++ b/pkgs/applications/altcoins/monero-gui/move-log-file.patch @@ -1,8 +1,8 @@ diff --git a/main.cpp b/main.cpp -index 1a9a979..2316929 100644 +index c03b160..a8ea263 100644 --- a/main.cpp +++ b/main.cpp -@@ -74,10 +74,6 @@ int main(int argc, char *argv[]) +@@ -80,14 +80,16 @@ int main(int argc, char *argv[]) // qDebug() << "High DPI auto scaling - enabled"; //#endif @@ -13,9 +13,6 @@ index 1a9a979..2316929 100644 MainApp app(argc, argv); qDebug() << "app startd"; -@@ -86,6 +82,13 @@ int main(int argc, char *argv[]) - app.setOrganizationDomain("getmonero.org"); - app.setOrganizationName("monero-project"); + // Log settings + QString logfile = @@ -23,20 +20,19 @@ index 1a9a979..2316929 100644 + + "/monero-wallet-gui.log"; + Monero::Wallet::init(argv[0], logfile.toUtf8().constData()); + -+ - filter *eventFilter = new filter; - app.installEventFilter(eventFilter); - + app.setApplicationName("monero-core"); + app.setOrganizationDomain("getmonero.org"); + app.setOrganizationName("monero-project"); diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp -index 8525bf3..6967b24 100644 +index 74649ce..fe1efc6 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp -@@ -613,7 +613,7 @@ QString Wallet::getDaemonLogPath() const - - QString Wallet::getWalletLogPath() const - { -- return QCoreApplication::applicationDirPath() + "/monero-wallet-gui.log"; -+ return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/monero-wallet-gui.log"; +@@ -729,7 +729,7 @@ QString Wallet::getWalletLogPath() const + #ifdef Q_OS_MACOS + return QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs/" + filename; + #else +- return QCoreApplication::applicationDirPath() + "/" + filename; ++ return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + filename; + #endif } - Wallet::Wallet(Monero::Wallet *w, QObject *parent) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2704910be948..e4aa703101c5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16722,7 +16722,9 @@ with pkgs; boost = boost15x; }; - monero-gui = libsForQt5.callPackage ../applications/altcoins/monero-gui { }; + monero-gui = libsForQt5.callPackage ../applications/altcoins/monero-gui { + boost = boost15x; + }; xmr-stak = callPackage ../applications/misc/xmr-stak { hwloc = hwloc-nox;