1{
2 lib,
3 stdenv,
4 bleak,
5 buildPythonPackage,
6 ecpy,
7 fetchPypi,
8 future,
9 hidapi,
10 nfcpy,
11 pillow,
12 protobuf,
13 pycrypto,
14 pycryptodomex,
15 pyelftools,
16 python-gnupg,
17 python-u2flib-host,
18 pythonOlder,
19 setuptools,
20 setuptools-scm,
21 websocket-client,
22}:
23
24buildPythonPackage rec {
25 pname = "ledgerblue";
26 version = "0.1.55";
27 pyproject = true;
28
29 disabled = pythonOlder "3.7";
30
31 src = fetchPypi {
32 inherit pname version;
33 hash = "sha256-6s2V8cXik6jEg8z3UK49qVwodPbwXMIkWk7iJ7OY0rM=";
34 };
35
36 build-system = [
37 setuptools
38 setuptools-scm
39 ];
40
41 pythonRelaxDeps = [ "protobuf" ];
42
43 dependencies = [
44 ecpy
45 future
46 hidapi
47 nfcpy
48 pillow
49 protobuf
50 pycrypto
51 pycryptodomex
52 pyelftools
53 python-gnupg
54 python-u2flib-host
55 websocket-client
56 ]
57 ++ lib.optionals stdenv.hostPlatform.isLinux [ bleak ];
58
59 # No tests
60 doCheck = false;
61
62 pythonImportsCheck = [ "ledgerblue" ];
63
64 meta = with lib; {
65 description = "Python library to communicate with Ledger Blue/Nano S";
66 homepage = "https://github.com/LedgerHQ/blue-loader-python";
67 license = licenses.asl20;
68 maintainers = with maintainers; [ np ];
69 };
70}