567e8dfd8e
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>
49 lines
956 B
Nix
49 lines
956 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
cryptography,
|
|
pycryptodome,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "joserfc";
|
|
version = "1.2.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "authlib";
|
|
repo = "joserfc";
|
|
tag = version;
|
|
hash = "sha256-GS1UvhOdeuyGaF/jS0zgdYkRxz6M8w4lFXcbtIPqQcY=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ cryptography ];
|
|
|
|
optional-dependencies = {
|
|
drafts = [ pycryptodome ];
|
|
};
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ lib.concatAttrValues optional-dependencies;
|
|
|
|
pythonImportsCheck = [ "joserfc" ];
|
|
|
|
meta = {
|
|
changelog = "https://github.com/authlib/joserfc/blob/${src.tag}/docs/changelog.rst";
|
|
description = "Implementations of JOSE RFCs in Python";
|
|
homepage = "https://github.com/authlib/joserfc";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|