diff options
author | William Casarin <jb55@jb55.com> | 2019-08-28 10:37:52 -0700 |
---|---|---|
committer | William Casarin <jb55@jb55.com> | 2019-08-29 05:01:42 -0700 |
commit | 72682e46546d6d024a29e2fde009372e03b45b9f (patch) | |
tree | 4f5c749f3fdff3f182d9f7b005339aa10fd53897 /pkgs/applications/blockchains/monero-gui | |
parent | 58fd72f3e996856d5a4ba21ae25f87a82fe3e5dc (diff) | |
download | nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar.gz nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar.bz2 nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar.lz nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar.xz nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.tar.zst nixpkgs-72682e46546d6d024a29e2fde009372e03b45b9f.zip |
tree: rename altcoins to blockchains
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat (limited to 'pkgs/applications/blockchains/monero-gui')
-rw-r--r-- | pkgs/applications/blockchains/monero-gui/default.nix | 102 | ||||
-rw-r--r-- | pkgs/applications/blockchains/monero-gui/move-log-file.patch | 15 |
2 files changed, 117 insertions, 0 deletions
diff --git a/pkgs/applications/blockchains/monero-gui/default.nix b/pkgs/applications/blockchains/monero-gui/default.nix new file mode 100644 index 00000000000..aaff39f1c6b --- /dev/null +++ b/pkgs/applications/blockchains/monero-gui/default.nix @@ -0,0 +1,102 @@ +{ stdenv, fetchFromGitHub +, wrapQtAppsHook, makeDesktopItem +, qtbase, qmake, qtmultimedia, qttools +, qtgraphicaleffects, qtdeclarative +, qtlocation, qtquickcontrols, qtquickcontrols2 +, qtwebchannel, qtwebengine, qtx11extras, qtxmlpatterns +, monero, unbound, readline, boost, libunwind +, libsodium, pcsclite, zeromq, cppzmq, pkgconfig +, hidapi +}: + +with stdenv.lib; + +let + qmlPath = qmlLib: "${qmlLib}/${qtbase.qtQmlPrefix}"; + + qml2ImportPath = concatMapStringsSep ":" qmlPath [ + qtbase.bin qtmultimedia.bin qtgraphicaleffects + qtdeclarative.bin qtlocation.bin + qtquickcontrols qtquickcontrols2.bin + qtwebchannel.bin qtwebengine.bin qtxmlpatterns + ]; + +in + +stdenv.mkDerivation rec { + name = "monero-gui-${version}"; + version = "0.14.1.2"; + + src = fetchFromGitHub { + owner = "monero-project"; + repo = "monero-gui"; + rev = "v${version}"; + sha256 = "1rm043r6y2mzy8pclnzbjjfxgps8pkfa2b92p66k8y8rdmgq6m1k"; + }; + + nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ]; + + buildInputs = [ + qtbase qtmultimedia qtgraphicaleffects + qtdeclarative qtlocation + qtquickcontrols qtquickcontrols2 + qtwebchannel qtwebengine qtx11extras + qtxmlpatterns monero unbound readline + boost libunwind libsodium pcsclite zeromq + cppzmq hidapi + ]; + + patches = [ + ./move-log-file.patch + ]; + + postPatch = '' + echo ' + var GUI_VERSION = "${version}"; + var GUI_MONERO_VERSION = "${getVersion monero}"; + ' > version.js + substituteInPlace monero-wallet-gui.pro \ + --replace '$$[QT_INSTALL_BINS]/lrelease' '${getDev qttools}/bin/lrelease' + substituteInPlace src/daemon/DaemonManager.cpp \ + --replace 'QApplication::applicationDirPath() + "' '"${monero}/bin' + ''; + + makeFlags = [ "INSTALL_ROOT=$(out)" ]; + + preBuild = '' + sed -i s#/opt/monero-wallet-gui##g Makefile + make -C src/zxcvbn-c + ''; + + desktopItem = makeDesktopItem { + name = "monero-wallet-gui"; + exec = "monero-wallet-gui"; + icon = "monero"; + desktopName = "Monero"; + genericName = "Wallet"; + categories = "Application;Network;Utility;"; + }; + + postInstall = '' + # install desktop entry + mkdir -p $out/share/applications + cp ${desktopItem}/share/applications/* $out/share/applications + + # install icons + for n in 16 24 32 48 64 96 128 256; do + size=$n"x"$n + mkdir -p $out/share/icons/hicolor/$size/apps + cp $src/images/appicons/$size.png \ + $out/share/icons/hicolor/$size/apps/monero.png + done; + ''; + + meta = { + description = "Private, secure, untraceable currency"; + homepage = https://getmonero.org/; + license = licenses.bsd3; + platforms = platforms.all; + badPlatforms = platforms.darwin; + maintainers = with maintainers; [ rnhmjoj ]; + }; +} diff --git a/pkgs/applications/blockchains/monero-gui/move-log-file.patch b/pkgs/applications/blockchains/monero-gui/move-log-file.patch new file mode 100644 index 00000000000..e540f1960d6 --- /dev/null +++ b/pkgs/applications/blockchains/monero-gui/move-log-file.patch @@ -0,0 +1,15 @@ +diff --git a/main.cpp b/main.cpp +index a51568d..5a9f683 100644 +--- a/main.cpp ++++ b/main.cpp +@@ -152,7 +152,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); |