1 { lib, stdenv, fetchFromGitHub, python3Packages, wrapQtAppsHook
2 , secp256k1, qtwayland }:
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-xOyj5XerOwgfvI0qj7+7oshDvd18h5IeZvcJTis8nWo=";
15 build-system = with python3Packages; [
19 propagatedBuildInputs = with python3Packages; [
36 # requirements-binaries
52 nativeBuildInputs = [ wrapQtAppsHook ];
54 buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
57 substituteInPlace contrib/requirements/requirements.txt \
58 --replace "qdarkstyle==2.6.8" "qdarkstyle<3"
60 substituteInPlace setup.py \
61 --replace "(share_dir" "(\"share\""
64 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
65 substituteInPlace $out/share/applications/electron-cash.desktop \
66 --replace "Exec=electron-cash" "Exec=$out/bin/electron-cash"
69 # If secp256k1 wasn't added to the library path, the following warning is given:
71 # Electron Cash was unable to find the secp256k1 library on this system.
72 # Elliptic curve cryptography operations will be performed in slow
75 makeWrapperArgs+=("''${qtWrapperArgs[@]}")
77 "--prefix" "LD_LIBRARY_PATH" ":" "${secp256k1}/lib"
81 doInstallCheck = true;
82 installCheckPhase = ''
83 $out/bin/electron-cash help >/dev/null
87 description = "Bitcoin Cash SPV Wallet";
88 mainProgram = "electron-cash";
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;