Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

electrum: fails to build on x86_64 #193997

Closed
uninsane opened this issue Oct 1, 2022 · 3 comments · Fixed by #194111 or #194112
Closed

electrum: fails to build on x86_64 #193997

uninsane opened this issue Oct 1, 2022 · 3 comments · Fixed by #194111 or #194112
Labels
0.kind: build failure A package fails to build

Comments

@uninsane
Copy link
Contributor

uninsane commented Oct 1, 2022

Steps To Reproduce

Steps to reproduce the behavior:

  1. git checkout 7446e0b9ff66506be32c476aba8b39b90c958c1f
  2. nix build './#electrum'

Build log

error: builder for '/nix/store/zlvi6a82yn1kaw7gnhar4qywl5pld9fw-electrum-4.3.2.drv' failed with exit code 1;
       last 10 log lines:
       > Executing pipInstallPhase
       > /build/Electrum-4.3.2/dist /build/Electrum-4.3.2
       > Processing ./Electrum-4.3.2-py3-none-any.whl
       > Requirement already satisfied: certifi in /nix/store/7c41mbz4wzybw51000006wh4am19i9nw-python3.10-certifi-2022.06.15/lib/python3.10/site-packages (from Electrum==4.3.2) (2022.6.15)
       > Requirement already satisfied: qdarkstyle>=2.7 in /nix/store/dmn14xr8kd0w2vqkkzwxnwr8r1s1k990-python3.10-qdarkstyle-3.1/lib/python3.10/site-packages (from Electrum==4.3.2) (3.1)
       > Requirement already satisfied: aiorpcx<0.23,>=0.22.0 in /nix/store/1gkapaa9aascq05xv32rs09q9lh2k7vw-python3.10-aiorpcx-0.22.1/lib/python3.10/site-packages (from Electrum==4.3.2) (0.22.1)
       > Requirement already satisfied: bitstring in /nix/store/qimannrqwa67wv5fk25mmgc3rwwn9kn5-python3.10-bitstring-3.1.9/lib/python3.10/site-packages (from Electrum==4.3.2) (3.1.9)
       > ERROR: Could not find a version that satisfies the requirement protobuf<4,>=3.12 (from electrum) (from versions: none)
       > ERROR: No matching distribution found for protobuf<4,>=3.12
       >

Additional context

Notify maintainers

Metadata

$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.70, NixOS, 22.11 (Raccoon)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.0`
 - channels(root): `"nixos-21.11.337526.8b3398bc758"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@uninsane uninsane added the 0.kind: build failure A package fails to build label Oct 1, 2022
@uninsane
Copy link
Contributor Author

uninsane commented Oct 2, 2022

bisected to:

that's the staging-next merge though, so a lot of surface area.

however, we appear to address a very similar build failure over in pkgs/development/python-modules/aioesphomeapi/default.nix by doing:

   postPatch = ''
     substituteInPlace requirements.txt \
       --replace "protobuf>=3.12.2,<4.0" "protobuf>=3.12.2"
   '';

i'm not sure how to test this same patch on electrum since it doesn't have any requirements.txt file.

@uninsane
Copy link
Contributor Author

uninsane commented Oct 2, 2022

oh just kidding, Electrum just places its requirements.txt in a different location. the patch below fixes the build when applied to master, and the application starts but i didn't test any functionality that i know touches protobuf. not sure how concerned i should be about overriding a pinned dep (i'm not a python dev):

diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index 46ea57c6193..8f2768fac74 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -111,6 +111,11 @@ python3.pkgs.buildPythonApplication {
     wrapQtApp $out/bin/electrum
   '';
 
+  postPatch = ''
+    substituteInPlace contrib/requirements/requirements.txt \
+      --replace "protobuf>=3.12,<4" "protobuf>=3.12"
+  '';
+
   checkInputs = with python3.pkgs; [ pytestCheckHook pyaes pycryptodomex ];
 
   pytestFlagsArray = [ "electrum/tests" ];

@prusnak
Copy link
Member

prusnak commented Oct 2, 2022

Fix in #194112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
2 participants