nixpkgs/pkgs/tools/security/pynitrokey/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.2 KiB
Nix
Raw Normal View History

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