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

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

53 lines
1,016 B
Nix
Raw Normal View History

2022-07-27 14:10:26 +02:00
{ python3Packages, lib, nrfutil }:
2022-01-12 10:08:14 +01:00
with python3Packages;
buildPythonApplication rec {
pname = "pynitrokey";
2022-08-18 18:55:45 +02:00
version = "0.4.27";
2022-01-12 10:08:14 +01:00
format = "flit";
src = fetchPypi {
inherit pname version;
2022-08-18 18:55:45 +02:00
sha256 = "sha256-aWQhMvATcDtyBtj38mGnypkKIqKQgneBzWDh5o/5Wkc=";
2022-01-12 10:08:14 +01:00
};
propagatedBuildInputs = [
click
cryptography
ecdsa
fido2
intelhex
2022-07-27 14:10:26 +02:00
nrfutil
2022-01-12 10:08:14 +01:00
pyserial
pyusb
requests
pygments
python-dateutil
2022-07-27 14:10:26 +02:00
spsdk
2022-01-12 10:08:14 +01:00
urllib3
cffi
cbor
nkdfu
];
2022-07-27 14:10:26 +02:00
# spsdk is patched to allow for newer cryptography
postPatch = ''
substituteInPlace pyproject.toml \
--replace "cryptography >=3.4.4,<37" "cryptography"
'';
2022-01-12 10:08:14 +01: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";
};
}