From 8847147a9dfacc682c9f9ba7bf41e5ff485a60c3 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 3 Oct 2022 01:01:39 -0700 Subject: [PATCH] Revert "electrum: fix build using upstream patch instead of own" the proposed fix doesn't work on x86_64 This reverts commit 5058694c5b8fd5a87b0f77d8b8147339bd6f7387. --- nixpatches/11-electrum-protobuf-fix.patch | 16 ++++++++++++++++ nixpatches/list.nix | 7 ++----- 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 nixpatches/11-electrum-protobuf-fix.patch diff --git a/nixpatches/11-electrum-protobuf-fix.patch b/nixpatches/11-electrum-protobuf-fix.patch new file mode 100644 index 00000000..d6d75d69 --- /dev/null +++ b/nixpatches/11-electrum-protobuf-fix.patch @@ -0,0 +1,16 @@ +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" ]; diff --git a/nixpatches/list.nix b/nixpatches/list.nix index e2203f06..cba780da 100644 --- a/nixpatches/list.nix +++ b/nixpatches/list.nix @@ -52,9 +52,6 @@ fetchpatch: [ sha256 = "sha256-OczjlQcG7sTM/V9Y9VL/qdwaWPKfjAJsh3czqqhRQig="; }) - # electrum: make compatible with protobuf 4+ (fixes electrum build) - (fetchpatch { - url = "https://github.com/NixOS/nixpkgs/pull/194112.diff"; - sha256 = "sha256-Nmvu1U5HBT0YQ5aTE2gf0aaglq/1WpgacCbpqP7F+Qc="; - }) + # fix electrum build: https://github.com/NixOS/nixpkgs/issues/193997 + ./11-electrum-protobuf-fix.patch ]