Skip to content

Comments

electrum: add patch for aiorpcx compatibility#309576

Merged
prusnak merged 1 commit intoNixOS:masterfrom
Yarny0:electrum-patch-aiorpcx
May 6, 2024
Merged

electrum: add patch for aiorpcx compatibility#309576
prusnak merged 1 commit intoNixOS:masterfrom
Yarny0:electrum-patch-aiorpcx

Conversation

@Yarny0
Copy link
Contributor

@Yarny0 Yarny0 commented May 6, 2024

Description of changes

electrum build broke due to the aiorpcx update in 97b53be via #305152 .

Upstream already has a patch, however, it's not so easy to apply:

  • the patch patches the file /run_electrum in the source repo
  • in the source repo, there is a symlink /electrum/electrum pointing to ../run_electrum, i.e., to the file that is patched
  • in the source distribution tarball used by nixpkgs, /electrum/electrum is a simple copy of /run_electrum (probably the result of whatever process generates the tarball)
  • the file /electrum/electrum is used as executable in the package output

Hence, although the patch will likely fix the next electrum release, just applying it to our source does not fix the issue. To work around that, this pull request also adds a copy command to the postFixup section to copy the patched /run_electrum over the unpatched /electrum/electrum. This is also explained in a comment near the fetchpatch line, so whoever removes the patch when it is no longer needed is also reminded of removing the copy command below.

Notifying maintainers: @joachifm @np @prusnak @chewblacka

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Result of nixpkgs-review run on x86_64-linux 1

2 packages built:
  • electrum
  • electrum.dist

Add a 👍 reaction to pull requests you find important.

electrum is quite strict about the aiorpcx version is accepts.
With commit 97b53be ,
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.
@ofborg ofborg bot requested review from chewblacka, joachifm, np and prusnak May 6, 2024 15:32
@ofborg ofborg bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels May 6, 2024
@prusnak prusnak merged commit f298c79 into NixOS:master May 6, 2024
@Yarny0 Yarny0 deleted the electrum-patch-aiorpcx branch May 10, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants