2019-03-13 17:24:13 +00:00
|
|
|
{ lib, fetchurl, python3Packages, qtbase, makeWrapper }:
|
2017-09-27 16:44:35 +01:00
|
|
|
|
2017-12-13 19:55:40 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
python = python3Packages.python;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
2019-03-13 17:24:13 +00:00
|
|
|
pname = "electron-cash";
|
2019-05-01 10:40:57 +01:00
|
|
|
version = "4.0.2";
|
2017-09-27 16:44:35 +01:00
|
|
|
|
2017-11-09 22:58:57 +00:00
|
|
|
src = fetchurl {
|
2019-03-13 17:24:13 +00:00
|
|
|
url = "https://electroncash.org/downloads/${version}/win-linux/Electron-Cash-${version}.tar.gz";
|
2017-11-09 22:58:57 +00:00
|
|
|
# Verified using official SHA-1 and signature from
|
|
|
|
# https://github.com/fyookball/keys-n-hashes
|
2019-05-01 10:40:57 +01:00
|
|
|
sha256 = "6255cd0493442ec57c10ae70ca2e84c6a29497f90a1393e6ac5772afe7572acf";
|
2017-09-27 16:44:35 +01:00
|
|
|
};
|
|
|
|
|
2017-12-13 19:55:40 +00:00
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2017-12-10 14:27:06 +00:00
|
|
|
dnspython
|
2017-09-27 16:44:35 +01:00
|
|
|
ecdsa
|
2017-12-13 19:55:40 +00:00
|
|
|
jsonrpclib-pelix
|
|
|
|
matplotlib
|
2017-09-27 16:44:35 +01:00
|
|
|
pbkdf2
|
|
|
|
pyaes
|
|
|
|
pycrypto
|
2017-12-13 19:55:40 +00:00
|
|
|
pyqt5
|
2017-09-27 16:44:35 +01:00
|
|
|
pysocks
|
|
|
|
qrcode
|
|
|
|
requests
|
2018-12-07 14:29:24 +00:00
|
|
|
tlslite-ng
|
2019-03-13 17:24:13 +00:00
|
|
|
qdarkstyle
|
2017-09-27 16:44:35 +01:00
|
|
|
|
|
|
|
# plugins
|
|
|
|
keepkey
|
|
|
|
trezor
|
2018-10-01 23:13:03 +01:00
|
|
|
btchip
|
2017-09-27 16:44:35 +01:00
|
|
|
];
|
|
|
|
|
2018-09-12 17:03:36 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2018-01-07 20:35:58 +00:00
|
|
|
postPatch = ''
|
2019-03-13 17:24:13 +00:00
|
|
|
substituteInPlace contrib/requirements/requirements.txt \
|
|
|
|
--replace "qdarkstyle<2.6" "qdarkstyle<3"
|
2018-01-07 20:35:58 +00:00
|
|
|
|
2019-03-13 17:24:13 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "(share_dir" "(\"share\""
|
2017-09-27 16:44:35 +01:00
|
|
|
'';
|
|
|
|
|
2017-12-13 19:55:40 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
2017-09-27 16:44:35 +01:00
|
|
|
postInstall = ''
|
2017-11-09 22:58:57 +00:00
|
|
|
substituteInPlace $out/share/applications/electron-cash.desktop \
|
2019-03-13 17:24:13 +00:00
|
|
|
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
|
2018-09-12 17:03:36 +01:00
|
|
|
|
2018-09-23 17:50:38 +01:00
|
|
|
# Please remove this when #44047 is fixed
|
2018-09-12 17:03:36 +01:00
|
|
|
wrapProgram $out/bin/electron-cash \
|
|
|
|
--prefix QT_PLUGIN_PATH : ${qtbase}/lib/qt-5.${lib.versions.minor qtbase.version}/plugins
|
2017-09-27 16:44:35 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
2018-09-12 17:03:36 +01:00
|
|
|
$out/bin/electron-cash help >/dev/null
|
2017-09-27 16:44:35 +01:00
|
|
|
'';
|
|
|
|
|
2019-03-13 17:24:13 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A Bitcoin Cash SPV Wallet";
|
2017-09-27 16:44:35 +01:00
|
|
|
longDescription = ''
|
2019-03-13 17:24:13 +00:00
|
|
|
An easy-to-use Bitcoin Cash client featuring wallets generated from
|
2017-09-27 16:44:35 +01: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 19:40:28 +00:00
|
|
|
platforms = platforms.linux;
|
2019-03-13 17:24:13 +00:00
|
|
|
maintainers = with maintainers; [ lassulus nyanloutre ];
|
2017-09-27 16:44:35 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|