nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 poetry-core,
6 cryptography,
7 fido2,
8 requests,
9 tlv8,
10 pyserial,
11 protobuf,
12 semver,
13 crcmod,
14 hidapi,
15}:
16
17buildPythonPackage rec {
18 pname = "nitrokey";
19 version = "0.4.2";
20 pyproject = true;
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-ZyB5gNZc5HxohZypc/198PPBxqG9URscQfXYAWzs7n8=";
25 };
26
27 pythonRelaxDeps = [
28 "protobuf"
29 "hidapi"
30 ];
31
32 build-system = [ poetry-core ];
33
34 dependencies = [
35 fido2
36 requests
37 semver
38 tlv8
39 crcmod
40 cryptography
41 hidapi
42 protobuf
43 pyserial
44 ];
45
46 # no tests
47 doCheck = false;
48
49 pythonImportsCheck = [ "nitrokey" ];
50
51 meta = {
52 description = "Python SDK for Nitrokey devices";
53 homepage = "https://github.com/Nitrokey/nitrokey-sdk-py";
54 changelog = "https://github.com/Nitrokey/nitrokey-sdk-py/releases/tag/v${version}";
55 license = with lib.licenses; [
56 asl20
57 mit
58 ];
59 maintainers = with lib.maintainers; [ panicgh ];
60 };
61}