electrum: add patch for aiorpcx compatibility
electrum is quite strict about the aiorpcx version is accepts.
With commit 97b53be707
,
aiorpcx got updated to 0.23.1 which is too much for electrum.
Upstream already has a patch to extend the
range of aiorpcx versions it permits.
We apply that patch until a the next release of electrum.
Unfortunatelly, the patch -- which we take from the
GitHub source repository -- does not patch every file
that that is needed to be patched in the distribution tarball.
Hence we have to copy the patched file over another file
in the `postPatch` hook of the build process.
See the comments there for more information.
This commit is contained in:
parent
25865a40d1
commit
0e513f0435
1 changed files with 24 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
, python3
|
, python3
|
||||||
, zbar
|
, zbar
|
||||||
|
@ -109,7 +110,30 @@ python.pkgs.buildPythonApplication {
|
||||||
pyqt6
|
pyqt6
|
||||||
];
|
];
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# aiorpcx 0.23.1 compatibility
|
||||||
|
# Note: this patches `/run_electrum`.
|
||||||
|
# In the source repo, `/electrum/electrum`
|
||||||
|
# is a symlink to `../run_electrum`,
|
||||||
|
# so that path would also be affected by the patch.
|
||||||
|
# However, in the distribution tarball used here,
|
||||||
|
# `/electrum/electrum` is simply an exact copy of
|
||||||
|
# `/run_electrum` and is thereby *not* affected.
|
||||||
|
# So we have to manually copy the patched `/run_electrum`
|
||||||
|
# over `/electrum/electrum` after the patching (see below).
|
||||||
|
# XXX remove the copy command in `postPatch`
|
||||||
|
# as soon as the patch itself is removed!
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/spesmilo/electrum/commit/5f95d919dfa9868eaf82889903b94faa8c6443e0.patch";
|
||||||
|
hash = "sha256-cEkduLsL6A8qPhXS2KPQWzVtkQPYQhHSbuwQ2SnanHw=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
# copy the patched `/run_electrum` over `/electrum/electrum`
|
||||||
|
# so the aiorpcx compatibility patch is used
|
||||||
|
cp run_electrum electrum/electrum
|
||||||
|
|
||||||
# make compatible with protobuf4 by easing dependencies ...
|
# make compatible with protobuf4 by easing dependencies ...
|
||||||
substituteInPlace ./contrib/requirements/requirements.txt \
|
substituteInPlace ./contrib/requirements/requirements.txt \
|
||||||
--replace "protobuf>=3.20,<4" "protobuf>=3.20"
|
--replace "protobuf>=3.20,<4" "protobuf>=3.20"
|
||||||
|
|
Loading…
Reference in a new issue