From 90ab6c8400c5c68e32113441e8dc4166dae50e98 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 4 Sep 2018 01:13:46 +0200 Subject: [PATCH 1/2] monero: 0.12.0.0 -> 0.12.3.0 --- pkgs/applications/altcoins/monero/default.nix | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/altcoins/monero/default.nix b/pkgs/applications/altcoins/monero/default.nix index cbba1ecba145..a4a884707a98 100644 --- a/pkgs/applications/altcoins/monero/default.nix +++ b/pkgs/applications/altcoins/monero/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fetchpatch +{ stdenv, fetchgit , cmake, pkgconfig, git , boost, miniupnpc, openssl, unbound, cppzmq , zeromq, pcsclite, readline @@ -11,25 +11,16 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "monero-${version}"; - version = "0.12.0.0"; + version = "0.12.3.0"; - src = fetchFromGitHub { - owner = "monero-project"; - repo = "monero"; + src = fetchgit { + url = "https://github.com/monero-project/monero.git"; rev = "v${version}"; - sha256 = "1lc9mkrl1m8mdbvj88y8y5rv44vinxf7dyv221ndmw5c5gs5zfgk"; + sha256 = "1609k1qn9xx37a92ai36rajds9cmdjlkqyka95hks5xjr3l5ca8i"; }; nativeBuildInputs = [ cmake pkgconfig git ]; - patches = [ - # fix daemon crash, remove with 0.12.1.0 update - (fetchpatch { - url = "https://github.com/monero-project/monero/commit/08343ab.diff"; - sha256 = "0f1snrl2mk2czwk1ysympzr8ismjx39fcqgy13276vcmw0cfqi83"; - }) - ]; - buildInputs = [ boost miniupnpc openssl unbound cppzmq zeromq pcsclite readline @@ -39,7 +30,7 @@ stdenv.mkDerivation rec { "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_GUI_DEPS=ON" "-DReadline_ROOT_DIR=${readline.dev}" - ]; + ] ++ optional stdenv.isDarwin "-DBoost_USE_MULTITHREADED=OFF"; hardeningDisable = [ "fortify" ]; From fd95d306095b664977285078a2169874c4766b1b Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 4 Sep 2018 12:11:19 +0200 Subject: [PATCH 2/2] monero-gui: 0.12.0.0 -> 0.12.3.0 --- .../altcoins/monero-gui/default.nix | 7 ++- .../altcoins/monero-gui/move-log-file.patch | 55 ++++++++----------- .../monero-gui/move-translations-dir.patch | 15 +++-- 3 files changed, 33 insertions(+), 44 deletions(-) diff --git a/pkgs/applications/altcoins/monero-gui/default.nix b/pkgs/applications/altcoins/monero-gui/default.nix index 2aff86ae1d38..49b8db51bcc8 100644 --- a/pkgs/applications/altcoins/monero-gui/default.nix +++ b/pkgs/applications/altcoins/monero-gui/default.nix @@ -12,13 +12,13 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "monero-gui-${version}"; - version = "0.12.0.0"; + version = "0.12.3.0"; src = fetchFromGitHub { owner = "monero-project"; repo = "monero-gui"; rev = "v${version}"; - sha256 = "1mg5ival8a2wdp14yib4wzqax4xyvd40zjy9anhszljds1439jhl"; + sha256 = "1ry0455cgirkc6n46qnlv5p49axjllil78xmx6469nbp3a2r3z7i"; }; nativeBuildInputs = [ qmake pkgconfig ]; @@ -70,7 +70,8 @@ stdenv.mkDerivation rec { cp ${desktopItem}/share/applications/* $out/share/applications # install translations - cp -r release/bin/translations $out/share/ + mkdir -p $out/share/translations + cp translations/*.qm $out/share/translations/ # install icons for n in 16 24 32 48 64 96 128 256; do diff --git a/pkgs/applications/altcoins/monero-gui/move-log-file.patch b/pkgs/applications/altcoins/monero-gui/move-log-file.patch index 08840c6a65e8..74f817d81350 100644 --- a/pkgs/applications/altcoins/monero-gui/move-log-file.patch +++ b/pkgs/applications/altcoins/monero-gui/move-log-file.patch @@ -1,38 +1,27 @@ diff --git a/main.cpp b/main.cpp -index c03b160..a8ea263 100644 +index 79223c0..e80b317 100644 --- a/main.cpp +++ b/main.cpp -@@ -80,14 +80,16 @@ int main(int argc, char *argv[]) - // qDebug() << "High DPI auto scaling - enabled"; - //#endif - -- // Log settings -- Monero::Wallet::init(argv[0], "monero-wallet-gui"); --// qInstallMessageHandler(messageHandler); -- - MainApp app(argc, argv); - - qDebug() << "app startd"; - -+ // Log settings -+ QString logfile = -+ QStandardPaths::writableLocation(QStandardPaths::CacheLocation) -+ + "/monero-wallet-gui.log"; -+ Monero::Wallet::init(argv[0], logfile.toUtf8().constData()); -+ - 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 74649ce..fe1efc6 100644 ---- a/src/libwalletqt/Wallet.cpp -+++ b/src/libwalletqt/Wallet.cpp -@@ -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; +@@ -115,6 +115,9 @@ int main(int argc, char *argv[]) + QCommandLineOption logPathOption(QStringList() << "l" << "log-file", + QCoreApplication::translate("main", "Log to specified file"), + QCoreApplication::translate("main", "file")); ++ logPathOption.setDefaultValue( ++ QStandardPaths::writableLocation(QStandardPaths::CacheLocation) ++ + "/monero-wallet-gui.log"); + parser.addOption(logPathOption); + parser.addHelpOption(); + parser.process(app); +diff --git a/Logger.cpp b/Logger.cpp +index 660bafc..dae24d4 100644 +--- a/Logger.cpp ++++ b/Logger.cpp +@@ -15,7 +15,7 @@ static const QString default_name = "monero-wallet-gui.log"; + #elif defined(Q_OS_MAC) + static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs"; + #else // linux + bsd +- static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0); ++ static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::CacheLocation).at(0); #endif - } + diff --git a/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch b/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch index 29bb56301547..ff17ce5da1c0 100644 --- a/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch +++ b/pkgs/applications/altcoins/monero-gui/move-translations-dir.patch @@ -1,14 +1,13 @@ diff --git a/TranslationManager.cpp b/TranslationManager.cpp -index fa39d35..5a410f7 100644 +index e7fc52a..83534cc 100644 --- a/TranslationManager.cpp +++ b/TranslationManager.cpp -@@ -29,7 +29,7 @@ bool TranslationManager::setLanguage(const QString &language) - #ifdef Q_OS_MACX - QString dir = qApp->applicationDirPath() + "/../Resources/translations"; - #else +@@ -25,7 +25,7 @@ bool TranslationManager::setLanguage(const QString &language) + return true; + } + - QString dir = qApp->applicationDirPath() + "/translations"; + QString dir = qApp->applicationDirPath() + "/../share/translations"; - #endif - QString filename = "monero-core_" + language; - + + qDebug("%s: loading translation file '%s' from '%s'",