Merge pull request #227894 from divanorama/electrum_new_ledger_protocol

electrum: fix ledger devices support
This commit is contained in:
Pavol Rusnak 2023-04-24 22:30:56 +02:00 committed by GitHub
commit d15bd5c53b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -5428,8 +5428,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;
};