about summary refs log tree commit diff
path: root/third_party/overlays
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-10-03T10·47+0200
committersterni <sternenseemann@systemli.org>2022-10-05T13·02+0000
commit8f2c67d5dd9fabc007fdf4e15dd1dfaf829de38f (patch)
treed8e5c17d38636fa4f30a1f59733b7b237887e5b8 /third_party/overlays
parent55ea15ab83e5cc8390eb330568ffe33bf4eb7281 (diff)
chore(3p/sources): Bump channels & overlays r/5037
* //3p/overlays/tvl: apply more or less questionable compilation fix for
  electrum with protobuf >= 4.

Change-Id: Iedbc45cb96b9e5382e304f2cd5ed9fc1c13f7884
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6850
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'third_party/overlays')
-rw-r--r--third_party/overlays/tvl.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/third_party/overlays/tvl.nix b/third_party/overlays/tvl.nix
index 7eb0d22fc8..62f4116a17 100644
--- a/third_party/overlays/tvl.nix
+++ b/third_party/overlays/tvl.nix
@@ -90,4 +90,19 @@ in
       meta.ci.skip = true;
     };
   }));
+
+
+  # Build electrum with protobuf >= 4 by following hypothetical instructions from
+  # upstream commit that pins to < 4
+  # https://github.com/spesmilo/electrum/commit/52b73880f95be5cf51742fec10cde0a2e4b23de4
+  # https://github.com/NixOS/nixpkgs/pull/194112
+  electrum = super.electrum.overrideAttrs (old: {
+    postPatch = ''
+      # make compatible with protobuf4 by easing dependencies ...
+      substituteInPlace ./contrib/requirements/requirements.txt \
+        --replace "protobuf>=3.12,<4" "protobuf>=3.12"
+      # ... and regenerating the paymentrequest_pb2.py file
+      protoc --python_out=. electrum/paymentrequest.proto
+    '' + old.postPatch or "";
+  });
 }