blob: 1f36eda5ab3d5c872998dc954aed7f7d3fb286ef (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
{ python3Packages, lib, nrfutil }:
with python3Packages;
buildPythonApplication rec {
pname = "pynitrokey";
version = "0.4.27";
format = "flit";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-aWQhMvATcDtyBtj38mGnypkKIqKQgneBzWDh5o/5Wkc=";
};
propagatedBuildInputs = [
click
cryptography
ecdsa
fido2
intelhex
nrfutil
pyserial
pyusb
requests
pygments
python-dateutil
spsdk
urllib3
cffi
cbor
nkdfu
];
# spsdk is patched to allow for newer cryptography
postPatch = ''
substituteInPlace pyproject.toml \
--replace "cryptography >=3.4.4,<37" "cryptography"
'';
# no tests
doCheck = false;
pythonImportsCheck = [ "pynitrokey" ];
meta = with lib; {
description = "Python client for Nitrokey devices";
homepage = "https://github.com/Nitrokey/pynitrokey";
license = with licenses; [ asl20 mit ];
maintainers = with maintainers; [ frogamic ];
mainProgram = "nitropy";
};
}
|