2020-09-25 04:45:31 +00:00
|
|
|
{ lib, fetchFromGitHub, python3Packages, qtbase, fetchpatch, wrapQtAppsHook
|
|
|
|
, secp256k1 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
|
|
pname = "electron-cash";
|
2021-04-12 18:23:04 +00:00
|
|
|
version = "4.2.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Electron-Cash";
|
|
|
|
repo = "Electron-Cash";
|
|
|
|
rev = version;
|
2021-04-12 18:23:04 +00:00
|
|
|
sha256 = "sha256-hiOS0cTaPqllb31p+6nU4GYvw/E1Hdn8yd3sppzGkqg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
2021-04-12 18:23:04 +00:00
|
|
|
# requirements
|
|
|
|
pyaes
|
2020-04-24 23:36:52 +00:00
|
|
|
ecdsa
|
2021-04-12 18:23:04 +00:00
|
|
|
requests
|
|
|
|
qrcode
|
|
|
|
protobuf
|
2020-04-24 23:36:52 +00:00
|
|
|
jsonrpclib-pelix
|
|
|
|
pysocks
|
|
|
|
qdarkstyle
|
2021-04-12 18:23:04 +00:00
|
|
|
python-dateutil
|
2020-04-24 23:36:52 +00:00
|
|
|
stem
|
2021-04-12 18:23:04 +00:00
|
|
|
certifi
|
|
|
|
pathvalidate
|
|
|
|
dnspython
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
# requirements-binaries
|
|
|
|
pyqt5
|
|
|
|
psutil
|
|
|
|
pycryptodomex
|
|
|
|
cryptography
|
|
|
|
|
|
|
|
# requirements-hw
|
|
|
|
cython
|
2020-04-24 23:36:52 +00:00
|
|
|
trezor
|
2021-04-12 18:23:04 +00:00
|
|
|
keepkey
|
2020-04-24 23:36:52 +00:00
|
|
|
btchip
|
2021-04-12 18:23:04 +00:00
|
|
|
hidapi
|
|
|
|
pyscard
|
|
|
|
pysatochip
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace contrib/requirements/requirements.txt \
|
|
|
|
--replace "qdarkstyle==2.6.8" "qdarkstyle<3"
|
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "(share_dir" "(\"share\""
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
checkInputs = with python3Packages; [ pytest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
unset HOME
|
2020-11-03 02:18:15 +00:00
|
|
|
pytest electroncash/tests
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
substituteInPlace $out/share/applications/electron-cash.desktop \
|
|
|
|
--replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# If secp256k1 wasn't added to the library path, the following warning is given:
|
|
|
|
#
|
|
|
|
# Electron Cash was unable to find the secp256k1 library on this system.
|
|
|
|
# Elliptic curve cryptography operations will be performed in slow
|
|
|
|
# Python-only mode.
|
2020-10-11 12:50:04 +00:00
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
"--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib"
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
|
|
$out/bin/electron-cash help >/dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Bitcoin Cash SPV Wallet";
|
|
|
|
longDescription = ''
|
|
|
|
An easy-to-use Bitcoin Cash client featuring wallets generated from
|
|
|
|
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;
|
2021-04-12 18:23:04 +00:00
|
|
|
maintainers = with maintainers; [ lassulus nyanloutre oxalica ];
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
}
|