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

94 lines
2.5 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-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;
stdenv.mkDerivation rec {
name = "monero-gui-${version}";
2018-11-16 21:58:05 +00:00
version = "0.13.0.4";
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-11-16 21:58:05 +00:00
sha256 = "142yj5s15bhm300dislq3x5inw1f37shnrd5vyj78jjcvry3wymw";
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-10-14 01:41:33 +01:00
boost libunwind libsodium pcsclite zeromq
2018-11-16 21:58:05 +00:00
cppzmq makeWrapper hidapi
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;
2018-11-16 21:58:05 +00:00
platforms = [ "x86_64-linux" ];
2018-01-26 23:07:07 +00:00
maintainers = with maintainers; [ rnhmjoj ];
};
}