2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, cryptography
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2022-10-21 18:38:19 +00:00
|
|
|
, sphinxHook
|
|
|
|
, sphinx-rtd-theme
|
|
|
|
, zope_interface
|
2021-05-20 23:08:51 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "pyjwt";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "2.6.0";
|
2022-10-21 18:38:19 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
2021-05-20 23:08:51 +00:00
|
|
|
pname = "PyJWT";
|
|
|
|
inherit version;
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-aShcfjH8RPaKH+swnpSODfUyWdV5KV5s/isXkjKfBf0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/types-cryptography/d' setup.cfg
|
|
|
|
'';
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
sphinxHook
|
|
|
|
sphinx-rtd-theme
|
|
|
|
zope_interface
|
|
|
|
];
|
|
|
|
|
|
|
|
passthru.optional-dependencies.crypto = [
|
2021-05-20 23:08:51 +00:00
|
|
|
cryptography
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
2022-10-21 18:38:19 +00:00
|
|
|
] ++ (lib.flatten (lib.attrValues passthru.optional-dependencies));
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
pythonImportsCheck = [ "jwt" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "JSON Web Token implementation in Python";
|
|
|
|
homepage = "https://github.com/jpadilla/pyjwt";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ prikhi ];
|
|
|
|
};
|
|
|
|
}
|