49 lines
970 B
Nix
49 lines
970 B
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
cryptography,
|
|
pycryptodome,
|
|
|
|
# tests
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "joserfc";
|
|
version = "1.1.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "authlib";
|
|
repo = "joserfc";
|
|
tag = version;
|
|
hash = "sha256-95xtUzzIxxvDtpHX/5uCHnTQTB8Fc08DZGUOR/SdKLs=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ cryptography ];
|
|
|
|
optional-dependencies = {
|
|
drafts = [ pycryptodome ];
|
|
};
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (lib.attrValues optional-dependencies);
|
|
|
|
pythonImportsCheck = [ "joserfc" ];
|
|
|
|
meta = with lib; {
|
|
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 = licenses.bsd3;
|
|
maintainers = [ ];
|
|
};
|
|
}
|