diff options
Diffstat (limited to 'pkgs/applications/misc/electrum')
-rw-r--r-- | pkgs/applications/misc/electrum/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/misc/electrum/ltc-aiorpcX-version-bump.patch | 44 | ||||
-rw-r--r-- | pkgs/applications/misc/electrum/ltc.nix | 20 |
3 files changed, 68 insertions, 4 deletions
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index eb24885ca1425..96afa4d39a1b1 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -13,7 +13,7 @@ }: let - version = "4.5.4"; + version = "4.5.5"; python = python3.override { self = python; @@ -46,7 +46,7 @@ let owner = "spesmilo"; repo = "electrum"; rev = version; - sha256 = "sha256-fDu2PlEQOF7ftlS6dYw15S2XiAx+D/bng4zC9ELj6uk="; + sha256 = "sha256-CbhI/q+zjk9odxuvdzpogi046FqkedJooiQwS+WAkJ8="; postFetch = '' mv $out ./all @@ -62,7 +62,7 @@ python.pkgs.buildPythonApplication { src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "sha256-lDuwXhOjcbCx8x/oIoigrklDwCbhn1trf5lDf/X/1Qc="; + sha256 = "1jiagz9avkbd158pcip7p4wz0pdsxi94ndvg5p8afvshb32aqwav"; }; postUnpack = '' @@ -98,7 +98,7 @@ python.pkgs.buildPythonApplication { keepkey trezor bitbox02 - cbor + cbor2 pyserial ] ++ lib.optionals enableQt [ pyqt5 diff --git a/pkgs/applications/misc/electrum/ltc-aiorpcX-version-bump.patch b/pkgs/applications/misc/electrum/ltc-aiorpcX-version-bump.patch new file mode 100644 index 0000000000000..8c7af75a5406d --- /dev/null +++ b/pkgs/applications/misc/electrum/ltc-aiorpcX-version-bump.patch @@ -0,0 +1,44 @@ +diff --git a/contrib/deterministic-build/requirements.txt b/contrib/deterministic-build/requirements.txt +index 7441e3389..2a4718f96 100644 +--- a/contrib/deterministic-build/requirements.txt ++++ b/contrib/deterministic-build/requirements.txt +@@ -74,9 +74,8 @@ aiohttp==3.8.1 \ + aiohttp-socks==0.7.1 \ + --hash=sha256:2215cac4891ef3fa14b7d600ed343ed0f0a670c23b10e4142aa862b3db20341a \ + --hash=sha256:94bcff5ef73611c6c6231c2ffc1be4af1599abec90dbd2fdbbd63233ec2fb0ff +-aiorpcX==0.22.1 \ +- --hash=sha256:6026f7bed3432e206589c94dcf599be8cd85b5736b118c7275845c1bd922a553 \ +- --hash=sha256:e74f9fbed3fd21598e71fe05066618fc2c06feec504fe29490ddda05fdbdde62 ++aiorpcX==0.23.1 \ ++ --hash=sha256:5b23002f1a4d5d3085e31555a07519c5ef8d4c40071eb499556ffda8114860a2 + aiosignal==1.2.0 \ + --hash=sha256:26e62109036cd181df6e6ad646f91f0dcfd05fe16d0cb924138ff2ab75d64e3a \ + --hash=sha256:78ed67db6c7b7ced4f98e495e572106d5c432a93e1ddd1bf475e1dc05f5b7df2 +diff --git a/contrib/requirements/requirements.txt b/contrib/requirements/requirements.txt +index 04b0a77f3..2330ea921 100644 +--- a/contrib/requirements/requirements.txt ++++ b/contrib/requirements/requirements.txt +@@ -1,7 +1,7 @@ + qrcode + protobuf>=3.12 + qdarkstyle>=2.7 +-aiorpcx>=0.22.0,<0.23 ++aiorpcx>=0.22.0,<0.24 + aiohttp>=3.3.0,<4.0.0 + aiohttp_socks>=0.3 + certifi +diff --git a/run_electrum b/run_electrum +index a1b30f29e..cb22f8724 100755 +--- a/run_electrum ++++ b/run_electrum +@@ -67,8 +67,8 @@ def check_imports(): + import aiorpcx + except ImportError as e: + sys.exit(f"Error: {str(e)}. Try 'sudo python3 -m pip install <module-name>'") +- if not ((0, 22, 0) <= aiorpcx._version < (0, 23)): +- raise RuntimeError(f'aiorpcX version {aiorpcx._version} does not match required: 0.22.0<=ver<0.23') ++ if not ((0, 22, 0) <= aiorpcx._version < (0, 24)): ++ raise RuntimeError(f'aiorpcX version {aiorpcx._version} does not match required: 0.22.0<=ver<0.24') + # the following imports are for pyinstaller + from google.protobuf import descriptor + from google.protobuf import message diff --git a/pkgs/applications/misc/electrum/ltc.nix b/pkgs/applications/misc/electrum/ltc.nix index a85252027e960..ef52f6211fdaa 100644 --- a/pkgs/applications/misc/electrum/ltc.nix +++ b/pkgs/applications/misc/electrum/ltc.nix @@ -82,6 +82,26 @@ python3.pkgs.buildPythonApplication { qdarkstyle ]; + patches = [ + # electrum-ltc attempts to pin to aiorpcX < 0.23, but nixpkgs + # has moved to newer versions. + # + # electrum-ltc hasn't been updated in some time, so we replicate + # the patch from electrum (BTC) and alter it to be usable with + # electrum-ltc. + # + # Similar to the BTC patch, we need to overwrite the symlink + # at electrum_ltc/electrum-ltc with the patched run_electrum + # in postPatch. + ./ltc-aiorpcX-version-bump.patch + ]; + + postPatch = '' + # copy the patched `/run_electrum` over `/electrum/electrum` + # so the aiorpcx compatibility patch is used + cp run_electrum electrum_ltc/electrum-ltc + ''; + preBuild = '' sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py substituteInPlace ./electrum_ltc/ecc_fast.py \ |