2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-12-09 12:39:15 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2020-12-09 12:39:15 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, cryptography
|
|
|
|
, click
|
|
|
|
, construct
|
|
|
|
, ecdsa
|
2023-05-24 13:37:59 +00:00
|
|
|
, flit-core
|
2020-12-09 12:39:15 +00:00
|
|
|
, hidapi
|
|
|
|
, intelhex
|
|
|
|
, pillow
|
2023-05-24 13:37:59 +00:00
|
|
|
, protobuf3
|
2020-12-09 12:39:15 +00:00
|
|
|
, requests
|
2023-05-24 13:37:59 +00:00
|
|
|
, setuptools
|
2020-12-09 12:39:15 +00:00
|
|
|
, tabulate
|
2023-05-24 13:37:59 +00:00
|
|
|
, toml
|
2020-12-09 12:39:15 +00:00
|
|
|
, AppKit
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ledgerwallet";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.2.4";
|
|
|
|
format = "pyproject";
|
2020-12-09 12:39:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LedgerHQ";
|
|
|
|
repo = "ledgerctl";
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-IcStYYkKEdZxwgJKL8l2Y1BtO/Oncd4aKUAZD8umbHs=";
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
buildInputs = [ flit-core setuptools ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
|
2020-12-09 12:39:15 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-05-24 13:37:59 +00:00
|
|
|
cryptography
|
|
|
|
click
|
|
|
|
construct
|
|
|
|
ecdsa
|
|
|
|
hidapi
|
|
|
|
intelhex
|
|
|
|
pillow
|
|
|
|
protobuf3
|
|
|
|
requests
|
|
|
|
tabulate
|
|
|
|
toml
|
2020-12-09 12:39:15 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "ledgerwallet" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-12-09 12:39:15 +00:00
|
|
|
homepage = "https://github.com/LedgerHQ/ledgerctl";
|
|
|
|
description = "A library to control Ledger devices";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "ledgerctl";
|
2020-12-09 12:39:15 +00:00
|
|
|
license = licenses.mit;
|
2023-05-24 13:37:59 +00:00
|
|
|
maintainers = with maintainers; [ d-xo erdnaxe ];
|
2020-12-09 12:39:15 +00:00
|
|
|
};
|
|
|
|
}
|