about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ledgerwallet/default.nix
blob: a8d9c612e157e329a8567edacbbabbf5e3a62cd1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, buildPythonPackage
, cryptography
, click
, construct
, ecdsa
, flit-core
, hidapi
, intelhex
, pillow
, protobuf3
, requests
, setuptools
, tabulate
, toml
, AppKit
}:

buildPythonPackage rec {
  pname = "ledgerwallet";
  version = "0.2.4";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "LedgerHQ";
    repo = "ledgerctl";
    rev = "v${version}";
    hash = "sha256-IcStYYkKEdZxwgJKL8l2Y1BtO/Oncd4aKUAZD8umbHs=";
  };

  buildInputs = [ flit-core setuptools ] ++ lib.optionals stdenv.isDarwin [ AppKit ];
  propagatedBuildInputs = [
    cryptography
    click
    construct
    ecdsa
    hidapi
    intelhex
    pillow
    protobuf3
    requests
    tabulate
    toml
  ];

  pythonImportsCheck = [ "ledgerwallet" ];

  meta = with lib; {
    homepage = "https://github.com/LedgerHQ/ledgerctl";
    description = "A library to control Ledger devices";
    mainProgram = "ledgerctl";
    license = licenses.mit;
    maintainers = with maintainers; [ d-xo erdnaxe ];
  };
}