nixpkgs-suyu/pkgs/applications/blockchains/monero-gui/default.nix

90 lines
2.5 KiB
Nix
Raw Normal View History

2019-11-10 15:46:49 +01:00
{ stdenv, wrapQtAppsHook, makeDesktopItem, fetchFromGitHub
2018-01-27 00:07:07 +01:00
, qtbase, qmake, qtmultimedia, qttools
, qtgraphicaleffects, qtdeclarative
2019-03-19 22:42:02 +01:00
, qtlocation, qtquickcontrols, qtquickcontrols2
, qtwebchannel, qtwebengine, qtx11extras, qtxmlpatterns
2018-01-27 00:07:07 +01:00
, monero, unbound, readline, boost, libunwind
2018-10-14 02:41:33 +02:00
, libsodium, pcsclite, zeromq, cppzmq, pkgconfig
2019-11-10 15:46:49 +01:00
, hidapi, randomx
2018-01-27 00:07:07 +01:00
}:
2019-11-10 15:46:49 +01:00
with stdenv.lib;
2018-01-27 00:07:07 +01:00
2019-11-10 15:46:49 +01:00
stdenv.mkDerivation rec {
2019-08-31 01:39:25 +02:00
pname = "monero-gui";
2019-11-28 14:37:24 +01:00
version = "0.15.0.1";
2018-01-27 00:07:07 +01:00
src = fetchFromGitHub {
owner = "monero-project";
repo = "monero-gui";
2018-04-03 22:35:44 +02:00
rev = "v${version}";
2019-11-28 14:37:24 +01:00
sha256 = "08j8kkncdn57xql0bhmlzjpjkdfhqbpda1p07r797q8qi0nl4w8n";
2018-01-27 00:07:07 +01:00
};
2019-11-10 15:46:49 +01:00
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
2018-01-27 00:07:07 +01:00
buildInputs = [
qtbase qtmultimedia qtgraphicaleffects
2019-03-19 22:42:02 +01:00
qtdeclarative qtlocation
qtquickcontrols qtquickcontrols2
2018-01-27 00:07:07 +01:00
qtwebchannel qtwebengine qtx11extras
qtxmlpatterns monero unbound readline
2018-10-14 02:41:33 +02:00
boost libunwind libsodium pcsclite zeromq
2019-11-10 15:46:49 +01:00
cppzmq hidapi randomx
2018-04-04 12:16:21 +02:00
];
2018-01-27 00:07:07 +01:00
2019-11-03 13:34:06 +01:00
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ];
2019-08-31 01:39:25 +02:00
patches = [ ./move-log-file.patch ];
2018-01-27 00:07:07 +01:00
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";
2018-01-27 00:07:07 +01:00
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 ];
2018-01-27 00:07:07 +01:00
};
}