nixpkgs/pkgs/development/python-modules/pyjwt/default.nix
Ihar Hrachyshka 567e8dfd8e
treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

61 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
cryptography,
pytestCheckHook,
sphinxHook,
sphinx-rtd-theme,
zope-interface,
oauthlib,
}:
buildPythonPackage rec {
pname = "pyjwt";
version = "2.10.1";
pyproject = true;
src = fetchFromGitHub {
owner = "jpadilla";
repo = "pyjwt";
tag = version;
hash = "sha256-BPVythRLpglYtpLEoaC7+Q4l9izYXH2M9JEbxdyQZqU=";
};
outputs = [
"out"
"doc"
];
build-system = [ setuptools ];
nativeBuildInputs = [
sphinxHook
sphinx-rtd-theme
zope-interface
];
optional-dependencies.crypto = [ cryptography ];
nativeCheckInputs = [ pytestCheckHook ] ++ (lib.concatAttrValues optional-dependencies);
disabledTests = [
# requires internet connection
"test_get_jwt_set_sslcontext_default"
];
pythonImportsCheck = [ "jwt" ];
passthru.tests = {
inherit oauthlib;
};
meta = {
changelog = "https://github.com/jpadilla/pyjwt/blob/${version}/CHANGELOG.rst";
description = "JSON Web Token implementation in Python";
homepage = "https://github.com/jpadilla/pyjwt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ prikhi ];
};
}