1{ lib, stdenv
2, fetchFromGitHub
3, buildPythonPackage
4, cryptography
5, click
6, construct
7, ecdsa
8, hidapi
9, intelhex
10, pillow
11, protobuf
12, requests
13, tabulate
14, AppKit
15}:
16
17buildPythonPackage rec {
18 pname = "ledgerwallet";
19 version = "0.1.2";
20
21 src = fetchFromGitHub {
22 owner = "LedgerHQ";
23 repo = "ledgerctl";
24 rev = "v${version}";
25 sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk";
26 };
27
28 buildInputs = lib.optionals stdenv.isDarwin [ AppKit ];
29 propagatedBuildInputs = [
30 cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate
31 ];
32
33 pythonImportsCheck = [ "ledgerwallet" ];
34
35 meta = with lib; {
36 homepage = "https://github.com/LedgerHQ/ledgerctl";
37 description = "A library to control Ledger devices";
38 license = licenses.mit;
39 maintainers = with maintainers; [ xwvvvvwx ];
40 };
41}