1 { lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook
4 python3Packages.buildPythonApplication rec {
5 pname = "electron-cash";
8 src = fetchFromGitHub {
9 owner = "Electron-Cash";
10 repo = "Electron-Cash";
11 rev = "refs/tags/${version}";
12 sha256 = "sha256-m13wJlNBG3BxOdKUyd3qmIhFBM7263FzMKr5lfD1tys=";
15 propagatedBuildInputs = with python3Packages; [
31 # requirements-binaries
48 nativeBuildInputs = [ wrapQtAppsHook ];
51 substituteInPlace contrib/requirements/requirements.txt \
52 --replace "qdarkstyle==2.6.8" "qdarkstyle<3"
54 substituteInPlace setup.py \
55 --replace "(share_dir" "(\"share\""
58 nativeCheckInputs = with python3Packages; [ pytest ];
62 pytest electroncash/tests
65 postInstall = lib.optionalString stdenv.isLinux ''
66 substituteInPlace $out/share/applications/electron-cash.desktop \
67 --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
70 # If secp256k1 wasn't added to the library path, the following warning is given:
72 # Electron Cash was unable to find the secp256k1 library on this system.
73 # Elliptic curve cryptography operations will be performed in slow
76 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
78 "--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib"
82 doInstallCheck = true;
83 installCheckPhase = ''
84 $out/bin/electron-cash help >/dev/null
88 description = "A Bitcoin Cash SPV Wallet";
90 An easy-to-use Bitcoin Cash client featuring wallets generated from
91 mnemonic seeds (in addition to other, more advanced, wallet options)
92 and the ability to perform transactions without downloading a copy
95 homepage = "https://www.electroncash.org/";
96 platforms = platforms.unix;
97 maintainers = with maintainers; [ lassulus nyanloutre oxalica ];
98 license = licenses.mit;