2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-12-07 19:11:03 +00:00
|
|
|
, fetchFromGitHub
|
2021-11-22 23:30:12 +00:00
|
|
|
, fetchpatch
|
2020-12-07 19:11:03 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, click
|
|
|
|
, construct
|
|
|
|
, ecdsa
|
|
|
|
, hidapi
|
|
|
|
, intelhex
|
|
|
|
, pillow
|
|
|
|
, protobuf
|
|
|
|
, requests
|
|
|
|
, tabulate
|
|
|
|
, AppKit
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ledgerwallet";
|
|
|
|
version = "0.1.2";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LedgerHQ";
|
|
|
|
repo = "ledgerctl";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk";
|
|
|
|
};
|
|
|
|
|
2021-11-17 23:42:07 +00:00
|
|
|
patches = [
|
2021-11-22 23:30:12 +00:00
|
|
|
(fetchpatch {
|
|
|
|
# Fix removed function in construct library
|
|
|
|
url = "https://github.com/LedgerHQ/ledgerctl/commit/fd23d0e14721b93789071e80632e6bd9e47c1256.patch";
|
2023-03-03 00:48:06 +00:00
|
|
|
hash = "sha256-YNlENguPQW5FNFT7mqED+ghF3TJiKao4H+56Eu+j+Eo=";
|
2021-11-22 23:30:12 +00:00
|
|
|
excludes = [ "setup.py" ];
|
|
|
|
})
|
2021-11-17 23:42:07 +00:00
|
|
|
];
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-12-07 19:11:03 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ledgerwallet" ];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-12-07 19:11:03 +00:00
|
|
|
homepage = "https://github.com/LedgerHQ/ledgerctl";
|
|
|
|
description = "A library to control Ledger devices";
|
|
|
|
license = licenses.mit;
|
2021-08-08 17:11:45 +00:00
|
|
|
maintainers = with maintainers; [ d-xo ];
|
2020-12-07 19:11:03 +00:00
|
|
|
};
|
|
|
|
}
|