about summary refs log tree commit diff
path: root/pkgs/applications/misc/electrum
diff options
context:
space:
mode:
authorJohn Garcia <jgarcia3788@yahoo.co.uk>2024-03-16 17:47:56 +0000
committerJohn Garcia <jgarcia3788@yahoo.co.uk>2024-03-16 22:07:46 +0000
commit54bea4702bcf038be9d09b70022ffa7730cbe088 (patch)
treea197f597ceb3cce2e490808e103d7359c2774be6 /pkgs/applications/misc/electrum
parent236cd757afa836b6e789e5ff2282490964b84703 (diff)
electrum: pin ledger-bitcoin to 0.2.1
Diffstat (limited to 'pkgs/applications/misc/electrum')
-rw-r--r--pkgs/applications/misc/electrum/default.nix25
1 files changed, 21 insertions, 4 deletions
diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix
index dfa9ce5238d8f..4d7b9a2ca215c 100644
--- a/pkgs/applications/misc/electrum/default.nix
+++ b/pkgs/applications/misc/electrum/default.nix
@@ -9,11 +9,28 @@
 , enableQt ? true
 , callPackage
 , qtwayland
+, fetchPypi
 }:
 
 let
   version = "4.5.3";
 
+  python = python3.override {
+    self = python;
+    packageOverrides = self: super: {
+      # Pin ledger-bitcoin to 0.2.1
+      ledger-bitcoin = super.ledger-bitcoin.overridePythonAttrs (oldAttrs: rec {
+        version = "0.2.1";
+        format = "pyproject";
+        src = fetchPypi {
+          pname = "ledger_bitcoin";
+          inherit version;
+          hash = "sha256-AWl/q2MzzspNIo6yf30S92PgM/Ygsb+1lJsg7Asztso=";
+        };
+      });
+    };
+  };
+
   libsecp256k1_name =
     if stdenv.isLinux then "libsecp256k1.so.{v}"
     else if stdenv.isDarwin then "libsecp256k1.{v}.dylib"
@@ -39,7 +56,7 @@ let
 
 in
 
-python3.pkgs.buildPythonApplication {
+python.pkgs.buildPythonApplication {
   pname = "electrum";
   inherit version;
 
@@ -56,7 +73,7 @@ python3.pkgs.buildPythonApplication {
   nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ];
   buildInputs = lib.optional (stdenv.isLinux && enableQt) qtwayland;
 
-  propagatedBuildInputs = with python3.pkgs; [
+  propagatedBuildInputs = with python.pkgs; [
     aiohttp
     aiohttp-socks
     aiorpcx
@@ -85,7 +102,7 @@ python3.pkgs.buildPythonApplication {
     qdarkstyle
   ];
 
-  checkInputs = with python3.pkgs; lib.optionals enableQt [
+  checkInputs = with python.pkgs; lib.optionals enableQt [
     pyqt6
   ];
 
@@ -117,7 +134,7 @@ python3.pkgs.buildPythonApplication {
     wrapQtApp $out/bin/electrum
   '';
 
-  nativeCheckInputs = with python3.pkgs; [ pytestCheckHook pyaes pycryptodomex ];
+  nativeCheckInputs = with python.pkgs; [ pytestCheckHook pyaes pycryptodomex ];
 
   pytestFlagsArray = [ "tests" ];