electron-cash: 4.3.1 -> 4.4.2, fix build and tests (#376281)

authored by Arne Keller and committed by GitHub cb60862b 107f72ad

+39 -24
+39 -22
pkgs/applications/misc/electron-cash/default.nix pkgs/by-name/el/electron-cash/package.nix
··· 1 - { lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook 2 - , secp256k1, qtwayland }: 1 + { 2 + lib, 3 + stdenv, 4 + fetchFromGitHub, 5 + python3Packages, 6 + qt5, 7 + secp256k1, 8 + }: 3 9 4 10 python3Packages.buildPythonApplication rec { 5 11 pname = "electron-cash"; 6 - version = "4.3.1"; 12 + version = "4.4.2"; 7 13 8 14 src = fetchFromGitHub { 9 15 owner = "Electron-Cash"; 10 16 repo = "Electron-Cash"; 11 17 tag = version; 12 - sha256 = "sha256-xOyj5XerOwgfvI0qj7+7oshDvd18h5IeZvcJTis8nWo="; 18 + sha256 = "sha256-hqaPxetS6JONvlRMjNonXUGFpdmnuadD00gcPzY07x0="; 13 19 }; 14 20 15 21 build-system = with python3Packages; [ ··· 38 44 psutil 39 45 pycryptodomex 40 46 cryptography 47 + zxing-cpp 41 48 42 49 # requirements-hw 43 50 trezor ··· 49 56 pysatochip 50 57 ]; 51 58 52 - nativeBuildInputs = [ wrapQtAppsHook ]; 59 + nativeBuildInputs = [ qt5.wrapQtAppsHook ]; 53 60 54 - buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland; 55 - 56 - postPatch = '' 57 - substituteInPlace contrib/requirements/requirements.txt \ 58 - --replace "qdarkstyle==2.6.8" "qdarkstyle<3" 59 - 60 - substituteInPlace setup.py \ 61 - --replace "(share_dir" "(\"share\"" 62 - ''; 61 + buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland; 63 62 64 63 # If secp256k1 wasn't added to the library path, the following warning is given: 65 64 # 66 65 # Electron Cash was unable to find the secp256k1 library on this system. 67 66 # Elliptic curve cryptography operations will be performed in slow 68 67 # 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 + 69 80 preFixup = '' 70 81 makeWrapperArgs+=("''${qtWrapperArgs[@]}") 71 - makeWrapperArgs+=( 72 - "--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib" 73 - ) 74 82 ''; 75 83 76 84 doInstallCheck = true; 77 85 installCheckPhase = '' 78 - $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 79 92 ''; 80 93 81 - meta = with lib; { 94 + meta = { 82 95 description = "Bitcoin Cash SPV Wallet"; 83 96 mainProgram = "electron-cash"; 84 97 longDescription = '' ··· 88 101 of the blockchain. 89 102 ''; 90 103 homepage = "https://www.electroncash.org/"; 91 - platforms = platforms.unix; 92 - maintainers = with maintainers; [ lassulus nyanloutre oxalica ]; 93 - license = licenses.mit; 104 + platforms = lib.platforms.unix; 105 + maintainers = with lib.maintainers; [ 106 + lassulus 107 + nyanloutre 108 + oxalica 109 + ]; 110 + license = lib.licenses.mit; 94 111 }; 95 112 }
-2
pkgs/top-level/all-packages.nix
··· 13109 13109 inherit (darwin.apple_sdk.frameworks) AppKit; 13110 13110 }; 13111 13111 13112 - electron-cash = libsForQt5.callPackage ../applications/misc/electron-cash { }; 13113 - 13114 13112 electrum = libsForQt5.callPackage ../applications/misc/electrum { }; 13115 13113 13116 13114 electrum-grs = libsForQt5.callPackage ../applications/misc/electrum/grs.nix { };