2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, wrapQtAppsHook, makeDesktopItem
|
|
|
|
, fetchFromGitHub, qmake, qttools, pkgconfig
|
|
|
|
, qtbase, qtdeclarative, qtgraphicaleffects
|
|
|
|
, qtmultimedia, qtxmlpatterns
|
|
|
|
, qtquickcontrols, qtquickcontrols2
|
|
|
|
, monero, unbound, readline, boost, libunwind
|
2020-06-15 15:56:04 +00:00
|
|
|
, libsodium, pcsclite, zeromq, libgcrypt, libgpgerror
|
2020-05-03 17:38:23 +00:00
|
|
|
, hidapi, libusb-compat-0_1, protobuf, randomx
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "monero-gui";
|
2020-07-18 16:06:22 +00:00
|
|
|
version = "0.16.0.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "monero-project";
|
|
|
|
repo = "monero-gui";
|
|
|
|
rev = "v${version}";
|
2020-07-18 16:06:22 +00:00
|
|
|
sha256 = "1b1m8vhs0hdh81ysm8s8vfwqskqsihylb51wz16kc98ba40r9gqg";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase qtdeclarative qtgraphicaleffects
|
|
|
|
qtmultimedia qtquickcontrols qtquickcontrols2
|
|
|
|
qtxmlpatterns
|
2020-06-15 15:56:04 +00:00
|
|
|
monero unbound readline libgcrypt libgpgerror
|
2020-04-24 23:36:52 +00:00
|
|
|
boost libunwind libsodium pcsclite zeromq
|
2020-06-15 15:56:04 +00:00
|
|
|
hidapi libusb-compat-0_1 protobuf randomx
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ];
|
|
|
|
|
|
|
|
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
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
# use nixpkgs monero sources
|
|
|
|
rmdir monero
|
|
|
|
ln -s "${monero.src}" monero
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "monero-wallet-gui";
|
|
|
|
exec = "monero-wallet-gui";
|
|
|
|
icon = "monero";
|
|
|
|
desktopName = "Monero";
|
|
|
|
genericName = "Wallet";
|
2020-07-18 16:06:22 +00:00
|
|
|
categories = "Network;Utility;";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|