2020-03-22 02:35:31 +00:00
|
|
|
{ stdenv, wrapQtAppsHook, makeDesktopItem
|
|
|
|
, fetchFromGitHub, qmake, qttools, pkgconfig
|
|
|
|
, qtbase, qtdeclarative, qtgraphicaleffects
|
|
|
|
, qtmultimedia, qtxmlpatterns
|
|
|
|
, qtquickcontrols, qtquickcontrols2
|
2018-01-26 23:07:07 +00:00
|
|
|
, monero, unbound, readline, boost, libunwind
|
2020-06-18 22:41:46 +01:00
|
|
|
, libsodium, pcsclite, zeromq, libgcrypt, libgpgerror
|
2020-04-28 04:29:39 +01:00
|
|
|
, hidapi, libusb-compat-0_1, protobuf, randomx
|
2018-01-26 23:07:07 +00:00
|
|
|
}:
|
|
|
|
|
2019-11-10 14:46:49 +00:00
|
|
|
with stdenv.lib;
|
2018-01-26 23:07:07 +00:00
|
|
|
|
2019-11-10 14:46:49 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-31 00:39:25 +01:00
|
|
|
pname = "monero-gui";
|
2020-06-18 22:41:46 +01:00
|
|
|
version = "0.16.0.0";
|
2018-01-26 23:07:07 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "monero-project";
|
|
|
|
repo = "monero-gui";
|
2018-04-03 21:35:44 +01:00
|
|
|
rev = "v${version}";
|
2020-06-18 22:41:46 +01:00
|
|
|
sha256 = "06vdrsj5y9k0zn32hspyxc7sw1kkyrvi3chzkdbnxk9jvyj8k4ld";
|
2018-01-26 23:07:07 +00:00
|
|
|
};
|
|
|
|
|
2019-11-10 14:46:49 +00:00
|
|
|
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
|
2018-01-26 23:07:07 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2020-03-22 02:35:31 +00:00
|
|
|
qtbase qtdeclarative qtgraphicaleffects
|
|
|
|
qtmultimedia qtquickcontrols qtquickcontrols2
|
|
|
|
qtxmlpatterns
|
2020-06-18 22:41:46 +01:00
|
|
|
monero unbound readline libgcrypt libgpgerror
|
2018-10-14 01:41:33 +01:00
|
|
|
boost libunwind libsodium pcsclite zeromq
|
2020-06-18 22:41:46 +01:00
|
|
|
hidapi libusb-compat-0_1 protobuf randomx
|
2018-04-04 11:16:21 +01:00
|
|
|
];
|
2018-01-26 23:07:07 +00:00
|
|
|
|
2019-11-03 12:34:06 +00:00
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-security" ];
|
|
|
|
|
2019-08-31 00:39:25 +01:00
|
|
|
patches = [ ./move-log-file.patch ];
|
2018-01-26 23:07:07 +00: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
|
2020-06-18 22:41:46 +01:00
|
|
|
|
|
|
|
# use nixpkgs monero sources
|
|
|
|
rmdir monero
|
|
|
|
ln -s "${monero.src}" monero
|
2018-01-26 23:07:07 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "monero-wallet-gui";
|
|
|
|
exec = "monero-wallet-gui";
|
|
|
|
icon = "monero";
|
2018-12-08 04:56:26 +00:00
|
|
|
desktopName = "Monero";
|
2018-01-26 23:07:07 +00: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 = {
|
2019-07-04 16:16:10 +01:00
|
|
|
description = "Private, secure, untraceable currency";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://getmonero.org/";
|
2019-07-04 16:16:10 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
badPlatforms = platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
2018-01-26 23:07:07 +00:00
|
|
|
};
|
|
|
|
}
|