2019-07-05 17:42:08 +02:00
|
|
|
{ lib, fetchurl, python3Packages, qtbase, wrapQtAppsHook }:
|
2017-09-27 17:44:35 +02:00
|
|
|
|
2017-12-13 20:55:40 +01:00
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-03-13 18:24:13 +01:00
|
|
|
pname = "electron-cash";
|
2019-09-09 23:55:56 +02:00
|
|
|
version = "4.0.10";
|
2017-09-27 17:44:35 +02:00
|
|
|
|
2017-11-09 23:58:57 +01:00
|
|
|
src = fetchurl {
|
2019-03-13 18:24:13 +01:00
|
|
|
url = "https://electroncash.org/downloads/${version}/win-linux/Electron-Cash-${version}.tar.gz";
|
2017-11-09 23:58:57 +01:00
|
|
|
# Verified using official SHA-1 and signature from
|
|
|
|
# https://github.com/fyookball/keys-n-hashes
|
2019-09-09 23:55:56 +02:00
|
|
|
sha256 = "48270e12956a2f4ef4d2b0cb60611e47f136b734a3741dab176542a32ae59ee5";
|
2017-09-27 17:44:35 +02:00
|
|
|
};
|
|
|
|
|
2017-12-13 20:55:40 +01:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2017-12-10 15:27:06 +01:00
|
|
|
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
|
2018-12-07 15:29:24 +01:00
|
|
|
tlslite-ng
|
2019-03-13 18:24:13 +01:00
|
|
|
qdarkstyle
|
2017-09-27 17:44:35 +02:00
|
|
|
|
|
|
|
# plugins
|
|
|
|
keepkey
|
|
|
|
trezor
|
2018-10-02 00:13:03 +02:00
|
|
|
btchip
|
2017-09-27 17:44:35 +02:00
|
|
|
];
|
|
|
|
|
2019-07-05 17:42:08 +02:00
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
2018-09-12 18:03:36 +02:00
|
|
|
|
2018-01-07 21:35:58 +01:00
|
|
|
postPatch = ''
|
2019-03-13 18:24:13 +01:00
|
|
|
substituteInPlace contrib/requirements/requirements.txt \
|
|
|
|
--replace "qdarkstyle<2.6" "qdarkstyle<3"
|
2018-01-07 21:35:58 +01:00
|
|
|
|
2019-03-13 18:24:13 +01:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "(share_dir" "(\"share\""
|
2017-09-27 17:44:35 +02:00
|
|
|
'';
|
|
|
|
|
2019-05-03 01:17:58 +02:00
|
|
|
checkInputs = with python3Packages; [
|
|
|
|
pytest
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
unset HOME
|
|
|
|
pytest lib/tests
|
|
|
|
'';
|
2017-12-13 20:55:40 +01:00
|
|
|
|
2017-09-27 17:44:35 +02:00
|
|
|
postInstall = ''
|
2017-11-09 23:58:57 +01:00
|
|
|
substituteInPlace $out/share/applications/electron-cash.desktop \
|
2019-03-13 18:24:13 +01:00
|
|
|
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
|
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
|
|
|
'';
|
|
|
|
|
2019-03-13 18:24:13 +01:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Bitcoin Cash SPV Wallet";
|
2017-09-27 17:44:35 +02:00
|
|
|
longDescription = ''
|
2019-03-13 18:24:13 +01:00
|
|
|
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/;
|
2018-01-09 20:40:28 +01:00
|
|
|
platforms = platforms.linux;
|
2019-03-13 18:24:13 +01:00
|
|
|
maintainers = with maintainers; [ lassulus nyanloutre ];
|
2017-09-27 17:44:35 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|