Merge pull request #311233 from RaghavSood/electrum-ltc/aiorpcx-patch

electrum-ltc: apply aiorpcX version bump patch

authored by Raghav Sood and committed by GitHub 766d1346 446ec6d9

+64
+44
pkgs/applications/misc/electrum/ltc-aiorpcX-version-bump.patch
···
··· 1 + diff --git a/contrib/deterministic-build/requirements.txt b/contrib/deterministic-build/requirements.txt 2 + index 7441e3389..2a4718f96 100644 3 + --- a/contrib/deterministic-build/requirements.txt 4 + +++ b/contrib/deterministic-build/requirements.txt 5 + @@ -74,9 +74,8 @@ aiohttp==3.8.1 \ 6 + aiohttp-socks==0.7.1 \ 7 + --hash=sha256:2215cac4891ef3fa14b7d600ed343ed0f0a670c23b10e4142aa862b3db20341a \ 8 + --hash=sha256:94bcff5ef73611c6c6231c2ffc1be4af1599abec90dbd2fdbbd63233ec2fb0ff 9 + -aiorpcX==0.22.1 \ 10 + - --hash=sha256:6026f7bed3432e206589c94dcf599be8cd85b5736b118c7275845c1bd922a553 \ 11 + - --hash=sha256:e74f9fbed3fd21598e71fe05066618fc2c06feec504fe29490ddda05fdbdde62 12 + +aiorpcX==0.23.1 \ 13 + + --hash=sha256:5b23002f1a4d5d3085e31555a07519c5ef8d4c40071eb499556ffda8114860a2 14 + aiosignal==1.2.0 \ 15 + --hash=sha256:26e62109036cd181df6e6ad646f91f0dcfd05fe16d0cb924138ff2ab75d64e3a \ 16 + --hash=sha256:78ed67db6c7b7ced4f98e495e572106d5c432a93e1ddd1bf475e1dc05f5b7df2 17 + diff --git a/contrib/requirements/requirements.txt b/contrib/requirements/requirements.txt 18 + index 04b0a77f3..2330ea921 100644 19 + --- a/contrib/requirements/requirements.txt 20 + +++ b/contrib/requirements/requirements.txt 21 + @@ -1,7 +1,7 @@ 22 + qrcode 23 + protobuf>=3.12 24 + qdarkstyle>=2.7 25 + -aiorpcx>=0.22.0,<0.23 26 + +aiorpcx>=0.22.0,<0.24 27 + aiohttp>=3.3.0,<4.0.0 28 + aiohttp_socks>=0.3 29 + certifi 30 + diff --git a/run_electrum b/run_electrum 31 + index a1b30f29e..cb22f8724 100755 32 + --- a/run_electrum 33 + +++ b/run_electrum 34 + @@ -67,8 +67,8 @@ def check_imports(): 35 + import aiorpcx 36 + except ImportError as e: 37 + sys.exit(f"Error: {str(e)}. Try 'sudo python3 -m pip install <module-name>'") 38 + - if not ((0, 22, 0) <= aiorpcx._version < (0, 23)): 39 + - raise RuntimeError(f'aiorpcX version {aiorpcx._version} does not match required: 0.22.0<=ver<0.23') 40 + + if not ((0, 22, 0) <= aiorpcx._version < (0, 24)): 41 + + raise RuntimeError(f'aiorpcX version {aiorpcx._version} does not match required: 0.22.0<=ver<0.24') 42 + # the following imports are for pyinstaller 43 + from google.protobuf import descriptor 44 + from google.protobuf import message
+20
pkgs/applications/misc/electrum/ltc.nix
··· 82 qdarkstyle 83 ]; 84 85 preBuild = '' 86 sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py 87 substituteInPlace ./electrum_ltc/ecc_fast.py \
··· 82 qdarkstyle 83 ]; 84 85 + patches = [ 86 + # electrum-ltc attempts to pin to aiorpcX < 0.23, but nixpkgs 87 + # has moved to newer versions. 88 + # 89 + # electrum-ltc hasn't been updated in some time, so we replicate 90 + # the patch from electrum (BTC) and alter it to be usable with 91 + # electrum-ltc. 92 + # 93 + # Similar to the BTC patch, we need to overwrite the symlink 94 + # at electrum_ltc/electrum-ltc with the patched run_electrum 95 + # in postPatch. 96 + ./ltc-aiorpcX-version-bump.patch 97 + ]; 98 + 99 + postPatch = '' 100 + # copy the patched `/run_electrum` over `/electrum/electrum` 101 + # so the aiorpcx compatibility patch is used 102 + cp run_electrum electrum_ltc/electrum-ltc 103 + ''; 104 + 105 preBuild = '' 106 sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py 107 substituteInPlace ./electrum_ltc/ecc_fast.py \