2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
blinker,
|
|
|
|
buildPythonPackage,
|
|
|
|
cryptography,
|
|
|
|
fetchFromGitHub,
|
|
|
|
mock,
|
|
|
|
pyjwt,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# for passthru.tests
|
|
|
|
django-allauth,
|
|
|
|
django-oauth-toolkit,
|
|
|
|
google-auth-oauthlib,
|
|
|
|
requests-oauthlib,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oauthlib";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "3.2.2";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-06-02 18:00:15 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
owner = "oauthlib";
|
|
|
|
repo = "oauthlib";
|
2022-01-13 20:06:32 +00:00
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
hash = "sha256-KADS1pEaLYi86LEt2VVuz8FVTBANzxC8EeQLgGMxuBU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-02-29 20:09:43 +00:00
|
|
|
rsa = [ cryptography ];
|
2024-06-05 15:53:02 +00:00
|
|
|
signedtoken = [
|
|
|
|
cryptography
|
|
|
|
pyjwt
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
signals = [ blinker ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2024-10-04 16:56:33 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
disabledTests = [
|
|
|
|
# https://github.com/oauthlib/oauthlib/issues/877
|
|
|
|
"test_rsa_bad_keys"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "oauthlib" ];
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit
|
|
|
|
django-allauth
|
|
|
|
django-oauth-toolkit
|
|
|
|
google-auth-oauthlib
|
2024-06-05 15:53:02 +00:00
|
|
|
requests-oauthlib
|
|
|
|
;
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-02-29 20:09:43 +00:00
|
|
|
changelog = "https://github.com/oauthlib/oauthlib/blob/${src.rev}/CHANGELOG.rst";
|
2022-04-15 01:41:22 +00:00
|
|
|
description = "Generic, spec-compliant, thorough implementation of the OAuth request-signing logic";
|
2024-02-29 20:09:43 +00:00
|
|
|
homepage = "https://github.com/oauthlib/oauthlib";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2022-04-15 01:41:22 +00:00
|
|
|
maintainers = with maintainers; [ prikhi ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|