2018-01-26 23:07:07 +00:00
|
|
|
{ stdenv, fetchFromGitHub
|
2019-07-05 16:42:08 +01:00
|
|
|
, wrapQtAppsHook, makeDesktopItem
|
2018-01-26 23:07:07 +00:00
|
|
|
, qtbase, qmake, qtmultimedia, qttools
|
|
|
|
, qtgraphicaleffects, qtdeclarative
|
2019-03-19 21:42:02 +00:00
|
|
|
, qtlocation, qtquickcontrols, qtquickcontrols2
|
|
|
|
, qtwebchannel, qtwebengine, qtx11extras, qtxmlpatterns
|
2018-01-26 23:07:07 +00:00
|
|
|
, monero, unbound, readline, boost, libunwind
|
2018-10-14 01:41:33 +01:00
|
|
|
, libsodium, pcsclite, zeromq, cppzmq, pkgconfig
|
2018-11-16 21:58:05 +00:00
|
|
|
, hidapi
|
2018-01-26 23:07:07 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2019-03-19 21:42:02 +00:00
|
|
|
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
|
|
|
|
|
2018-01-26 23:07:07 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "monero-gui-${version}";
|
2019-08-05 02:15:40 +01:00
|
|
|
version = "0.14.1.2";
|
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}";
|
2019-08-05 02:15:40 +01:00
|
|
|
sha256 = "1rm043r6y2mzy8pclnzbjjfxgps8pkfa2b92p66k8y8rdmgq6m1k";
|
2018-01-26 23:07:07 +00:00
|
|
|
};
|
|
|
|
|
2019-07-05 16:42:08 +01:00
|
|
|
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
|
2018-01-26 23:07:07 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase qtmultimedia qtgraphicaleffects
|
2019-03-19 21:42:02 +00:00
|
|
|
qtdeclarative qtlocation
|
|
|
|
qtquickcontrols qtquickcontrols2
|
2018-01-26 23:07:07 +00:00
|
|
|
qtwebchannel qtwebengine qtx11extras
|
|
|
|
qtxmlpatterns monero unbound readline
|
2018-10-14 01:41:33 +01:00
|
|
|
boost libunwind libsodium pcsclite zeromq
|
2019-07-05 16:42:08 +01:00
|
|
|
cppzmq hidapi
|
2018-04-04 11:16:21 +01:00
|
|
|
];
|
2018-01-26 23:07:07 +00:00
|
|
|
|
|
|
|
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";
|
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";
|
|
|
|
homepage = https://getmonero.org/;
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
badPlatforms = platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
2018-01-26 23:07:07 +00:00
|
|
|
};
|
|
|
|
}
|