99
1010python3Packages . buildPythonApplication rec {
1111 pname = "electron-cash" ;
12- version = "4.3.1 " ;
12+ version = "4.4.2 " ;
1313
1414 src = fetchFromGitHub {
1515 owner = "Electron-Cash" ;
1616 repo = "Electron-Cash" ;
1717 tag = version ;
18- sha256 = "sha256-xOyj5XerOwgfvI0qj7+7oshDvd18h5IeZvcJTis8nWo =" ;
18+ sha256 = "sha256-hqaPxetS6JONvlRMjNonXUGFpdmnuadD00gcPzY07x0 =" ;
1919 } ;
2020
2121 build-system = with python3Packages ; [
@@ -44,6 +44,7 @@ python3Packages.buildPythonApplication rec {
4444 psutil
4545 pycryptodomex
4646 cryptography
47+ zxing-cpp
4748
4849 # requirements-hw
4950 trezor
@@ -59,32 +60,38 @@ python3Packages.buildPythonApplication rec {
5960
6061 buildInputs = [ ] ++ lib . optional stdenv . hostPlatform . isLinux qt5 . qtwayland ;
6162
62- postPatch = ''
63- substituteInPlace contrib/requirements/requirements.txt \
64- --replace "qdarkstyle==2.6.8" "qdarkstyle<3"
65-
66- substituteInPlace setup.py \
67- --replace "(share_dir" "(\"share\""
68- '' ;
69-
7063 # If secp256k1 wasn't added to the library path, the following warning is given:
7164 #
7265 # Electron Cash was unable to find the secp256k1 library on this system.
7366 # Elliptic curve cryptography operations will be performed in slow
7467 # Python-only mode.
68+ #
69+ # Upstream hardcoded `libsecp256k1.so.0` where we provides
70+ # `libsecp256k1.so.5`. The only breaking change is the removal of two
71+ # functions which seem not used by electron-cash.
72+ # See: <https://github.com/Electron-Cash/Electron-Cash/issues/3009>
73+ postPatch = ''
74+ substituteInPlace setup.py \
75+ --replace-fail "(share_dir" '("share"'
76+ substituteInPlace electroncash/secp256k1.py \
77+ --replace-fail "libsecp256k1.so.0" "${ secp256k1 } /lib/libsecp256k1.so.5"
78+ '' ;
79+
7580 preFixup = ''
7681 makeWrapperArgs+=("'' ${qtWrapperArgs[@]}")
77- makeWrapperArgs+=(
78- "--prefix" "LD_LIBRARY_PATH" ":" "${ secp256k1 } /lib"
79- )
8082 '' ;
8183
8284 doInstallCheck = true ;
8385 installCheckPhase = ''
84- $out/bin/electron-cash help >/dev/null
86+ output="$($out/bin/electron-cash help 2>&1)"
87+ if [[ "$output" == *"failed to load"* ]]; then
88+ echo "$output"
89+ echo "Forbidden text detected: failed to load"
90+ exit 1
91+ fi
8592 '' ;
8693
87- meta = with lib ; {
94+ meta = {
8895 description = "Bitcoin Cash SPV Wallet" ;
8996 mainProgram = "electron-cash" ;
9097 longDescription = ''
@@ -94,12 +101,12 @@ python3Packages.buildPythonApplication rec {
94101 of the blockchain.
95102 '' ;
96103 homepage = "https://www.electroncash.org/" ;
97- platforms = platforms . unix ;
98- maintainers = with maintainers ; [
104+ platforms = lib . platforms . unix ;
105+ maintainers = with lib . maintainers ; [
99106 lassulus
100107 nyanloutre
101108 oxalica
102109 ] ;
103- license = licenses . mit ;
110+ license = lib . licenses . mit ;
104111 } ;
105112}
0 commit comments