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