nixpkgs/pkgs/applications/misc/electron-cash/default.nix

81 lines
2 KiB
Nix
Raw Normal View History

{ lib, fetchurl, python3Packages, qtbase, makeWrapper }:
2017-09-27 17:44:35 +02:00
2017-12-13 20:55:40 +01:00
let
python = python3Packages.python;
in
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
version = "3.3.6";
2017-09-27 17:44:35 +02:00
src = fetchurl {
url = "https://electroncash.org/downloads/${version}/win-linux/Electron-Cash-${version}.tar.gz";
# Verified using official SHA-1 and signature from
# https://github.com/fyookball/keys-n-hashes
sha256 = "ac435f2bf98b9b50c4bdcc9e3fb2ff19d9c66f8cce5df852f3a4727306bb0a84";
2017-09-27 17:44:35 +02:00
};
2017-12-13 20:55:40 +01:00
propagatedBuildInputs = with python3Packages; [
dnspython
2017-09-27 17:44:35 +02:00
ecdsa
2017-12-13 20:55:40 +01:00
jsonrpclib-pelix
matplotlib
2017-09-27 17:44:35 +02:00
pbkdf2
pyaes
pycrypto
2017-12-13 20:55:40 +01:00
pyqt5
2017-09-27 17:44:35 +02:00
pysocks
qrcode
requests
tlslite-ng
qdarkstyle
2017-09-27 17:44:35 +02:00
# plugins
keepkey
trezor
btchip
2017-09-27 17:44:35 +02:00
];
2018-09-12 18:03:36 +02:00
nativeBuildInputs = [ makeWrapper ];
2018-01-07 21:35:58 +01:00
postPatch = ''
substituteInPlace contrib/requirements/requirements.txt \
--replace "qdarkstyle<2.6" "qdarkstyle<3"
2018-01-07 21:35:58 +01:00
substituteInPlace setup.py \
--replace "(share_dir" "(\"share\""
2017-09-27 17:44:35 +02:00
'';
2017-12-13 20:55:40 +01:00
doCheck = false;
2017-09-27 17:44:35 +02:00
postInstall = ''
substituteInPlace $out/share/applications/electron-cash.desktop \
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
2018-09-12 18:03:36 +02:00
# Please remove this when #44047 is fixed
2018-09-12 18:03:36 +02:00
wrapProgram $out/bin/electron-cash \
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
2017-09-27 17:44:35 +02:00
'';
doInstallCheck = true;
installCheckPhase = ''
2018-09-12 18:03:36 +02:00
$out/bin/electron-cash help >/dev/null
2017-09-27 17:44:35 +02:00
'';
meta = with lib; {
description = "A Bitcoin Cash SPV Wallet";
2017-09-27 17:44:35 +02:00
longDescription = ''
An easy-to-use Bitcoin Cash client featuring wallets generated from
2017-09-27 17:44:35 +02:00
mnemonic seeds (in addition to other, more advanced, wallet options)
and the ability to perform transactions without downloading a copy
of the blockchain.
'';
homepage = https://www.electroncash.org/;
platforms = platforms.linux;
maintainers = with maintainers; [ lassulus nyanloutre ];
2017-09-27 17:44:35 +02:00
license = licenses.mit;
};
}