3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/altcoins/monero-gui/default.nix

93 lines
2.4 KiB
Nix
Raw Normal View History

2018-01-26 23:07:07 +00:00
{ stdenv, fetchFromGitHub
, makeWrapper, makeDesktopItem
, qtbase, qmake, qtmultimedia, qttools
, qtgraphicaleffects, qtdeclarative
2018-03-31 10:41:11 +01:00
, qtlocation, qtquickcontrols2, qtwebchannel
2018-01-26 23:07:07 +00:00
, qtwebengine, qtx11extras, qtxmlpatterns
, monero, unbound, readline, boost, libunwind
2018-03-31 10:41:11 +01:00
, pcsclite, zeromq, cppzmq, pkgconfig
2018-01-26 23:07:07 +00:00
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "monero-gui-${version}";
2018-09-04 11:11:19 +01:00
version = "0.12.3.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}";
2018-09-04 11:11:19 +01:00
sha256 = "1ry0455cgirkc6n46qnlv5p49axjllil78xmx6469nbp3a2r3z7i";
2018-01-26 23:07:07 +00:00
};
2018-03-31 10:41:11 +01:00
nativeBuildInputs = [ qmake pkgconfig ];
2018-01-26 23:07:07 +00:00
buildInputs = [
qtbase qtmultimedia qtgraphicaleffects
2018-03-31 10:41:11 +01:00
qtdeclarative qtlocation qtquickcontrols2
2018-01-26 23:07:07 +00:00
qtwebchannel qtwebengine qtx11extras
qtxmlpatterns monero unbound readline
2018-03-31 10:41:11 +01:00
boost libunwind pcsclite zeromq cppzmq
makeWrapper
2018-04-04 11:16:21 +01:00
];
2018-01-26 23:07:07 +00:00
patches = [
./move-log-file.patch
./move-translations-dir.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 Wallet";
genericName = "Wallet";
categories = "Application;Network;Utility;";
};
postInstall = ''
# install desktop entry
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
# install translations
2018-09-04 11:11:19 +01:00
mkdir -p $out/share/translations
cp translations/*.qm $out/share/translations/
2018-01-26 23:07:07 +00:00
# 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;
maintainers = with maintainers; [ rnhmjoj ];
};
}