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