electrum: fix ledger devices support

New Ledger protocol needs a new dependency to work
https://github.com/spesmilo/electrum/pull/8041
This commit is contained in:
Dmitry Ivankov 2023-04-24 01:14:35 +02:00
parent 5b04692dc2
commit 51b96d8e85
4 changed files with 75 additions and 0 deletions

View file

@ -72,6 +72,7 @@ python3.pkgs.buildPythonApplication {
tlslite-ng
# plugins
btchip-python
ledger-bitcoin
ckcc-protocol
keepkey
trezor

View file

@ -0,0 +1,40 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, ledgercomm
, packaging
, typing-extensions
}:
buildPythonPackage rec {
pname = "ledger-bitcoin";
version = "0.2.1";
format = "pyproject";
src = fetchPypi {
inherit version;
pname = "ledger_bitcoin";
hash = "sha256-AWl/q2MzzspNIo6yf30S92PgM/Ygsb+1lJsg7Asztso=";
};
nativeBuildInputs = [
setuptools
];
propagatedBuildInputs = [
ledgercomm
packaging
typing-extensions
];
pythonImportsCheck = [
"ledger_bitcoin"
];
meta = with lib; {
description = "Client library for Ledger Bitcoin application.";
homepage = "https://github.com/LedgerHQ/app-bitcoin-new/tree/develop/bitcoin_client/ledger_bitcoin";
license = licenses.asl20;
};
}

View file

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
}:
buildPythonPackage rec {
pname = "ledgercomm";
version = "1.1.2";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-izOPbwv+34Xq8mpq9+QRIGhd+z4pVnGJSMnYOktRVbs=";
};
nativeBuildInputs = [
setuptools
];
pythonImportsCheck = [
"ledgercomm"
];
meta = with lib; {
description = "Python library to send and receive APDU through HID or TCP socket. It can be used with a Ledger Nano S/X or with the Speculos emulator.";
homepage = "https://github.com/LedgerHQ/ledgercomm";
license = licenses.mit;
};
}

View file

@ -5426,8 +5426,12 @@ self: super: with self; {
ledger_agent = callPackage ../development/python-modules/ledger_agent { };
ledger-bitcoin = callPackage ../development/python-modules/ledger-bitcoin { };
ledgerblue = callPackage ../development/python-modules/ledgerblue { };
ledgercomm = callPackage ../development/python-modules/ledgercomm { };
ledgerwallet = callPackage ../development/python-modules/ledgerwallet {
inherit (pkgs.darwin.apple_sdk.frameworks) AppKit;
};