2023-03-30 22:05:00 +00:00
|
|
|
{ python3Packages, lib, nrfutil, libnitrokey }:
|
2022-01-27 00:19:43 +00:00
|
|
|
|
|
|
|
with python3Packages;
|
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "pynitrokey";
|
2023-03-30 22:05:00 +00:00
|
|
|
version = "0.4.34";
|
2022-01-27 00:19:43 +00:00
|
|
|
format = "flit";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-30 22:05:00 +00:00
|
|
|
hash = "sha256-lMXoDkNiAmGb6e4u/vZMcmXUclwW402YUGihLjWIr+U=";
|
2022-01-27 00:19:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2023-03-30 22:05:00 +00:00
|
|
|
certifi
|
|
|
|
cffi
|
2022-01-27 00:19:43 +00:00
|
|
|
click
|
|
|
|
cryptography
|
|
|
|
ecdsa
|
2023-03-30 22:05:00 +00:00
|
|
|
frozendict
|
2022-01-27 00:19:43 +00:00
|
|
|
fido2
|
|
|
|
intelhex
|
2023-03-30 22:05:00 +00:00
|
|
|
nkdfu
|
2022-08-21 13:32:41 +00:00
|
|
|
nrfutil
|
2023-03-30 22:05:00 +00:00
|
|
|
python-dateutil
|
2022-01-27 00:19:43 +00:00
|
|
|
pyusb
|
|
|
|
requests
|
2022-08-21 13:32:41 +00:00
|
|
|
spsdk
|
2023-03-30 22:05:00 +00:00
|
|
|
tqdm
|
2022-01-27 00:19:43 +00:00
|
|
|
urllib3
|
2023-03-24 00:07:29 +00:00
|
|
|
tlv8
|
2023-03-30 22:05:00 +00:00
|
|
|
typing-extensions
|
2023-03-24 00:07:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pythonRelaxDepsHook
|
2022-01-27 00:19:43 +00:00
|
|
|
];
|
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"cryptography"
|
2023-03-30 22:05:00 +00:00
|
|
|
"python-dateutil"
|
2023-03-24 00:07:29 +00:00
|
|
|
"spsdk"
|
2023-03-30 22:05:00 +00:00
|
|
|
"typing_extensions"
|
|
|
|
];
|
|
|
|
|
|
|
|
# libnitrokey is not propagated to users of pynitrokey
|
|
|
|
# It is only usable from the wrapped bin/nitropy
|
|
|
|
makeWrapperArgs = [
|
|
|
|
"--set LIBNK_PATH ${lib.makeLibraryPath [ libnitrokey ]}"
|
2023-03-24 00:07:29 +00:00
|
|
|
];
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2022-01-27 00:19:43 +00:00
|
|
|
# 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";
|
|
|
|
};
|
|
|
|
}
|