1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 flit,
7 click,
8 cryptography,
9 ecdsa,
10 fido2,
11 intelhex,
12 pyserial,
13 pyusb,
14 requests,
15}:
16
17buildPythonPackage rec {
18 pname = "solo-python";
19 version = "0.1.1";
20 format = "pyproject";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchFromGitHub {
25 owner = "solokeys";
26 repo = "solo-python";
27 rev = version;
28 hash = "sha256-XVPYr7JwxeZfZ68+vQ7a7MNiAfJ2bvMbM3R1ryVJ+OU=";
29 };
30
31 nativeBuildInputs = [ flit ];
32
33 propagatedBuildInputs = [
34 click
35 cryptography
36 ecdsa
37 fido2
38 intelhex
39 pyserial
40 pyusb
41 requests
42 ];
43
44 preBuild = ''
45 export HOME=$TMPDIR
46 '';
47
48 pythonImportsCheck = [
49 "solo"
50 "solo.cli"
51 "solo.commands"
52 "solo.fido2"
53 "solo.operations"
54 ];
55
56 meta = with lib; {
57 description = "Python tool and library for SoloKeys Solo 1";
58 homepage = "https://github.com/solokeys/solo1-cli";
59 maintainers = with maintainers; [ wucke13 ];
60 license = with licenses; [
61 asl20
62 mit
63 ];
64 # not compatible with fido2 >= 1.0.0
65 # https://github.com/solokeys/solo1-cli/issues/157
66 broken = versionAtLeast fido2.version "1.0.0";
67 };
68}