2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, blinker
|
2022-04-15 01:41:22 +00:00
|
|
|
, buildPythonPackage
|
2022-01-13 20:06:32 +00:00
|
|
|
, cryptography
|
2022-04-15 01:41:22 +00:00
|
|
|
, fetchFromGitHub
|
2022-01-13 20:06:32 +00:00
|
|
|
, mock
|
2022-04-15 01:41:22 +00:00
|
|
|
, pyjwt
|
2022-01-13 20:06:32 +00:00
|
|
|
, pytestCheckHook
|
2022-04-15 01:41:22 +00:00
|
|
|
, pythonOlder
|
2024-02-29 20:09:43 +00:00
|
|
|
, setuptools
|
2023-07-15 17:15:38 +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-02-29 20:09:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
rsa = [ cryptography ];
|
|
|
|
signedtoken = [ cryptography pyjwt ];
|
|
|
|
signals = [ blinker ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-01-13 20:06:32 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2024-02-29 20:09:43 +00:00
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"oauthlib"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit
|
|
|
|
django-allauth
|
|
|
|
django-oauth-toolkit
|
|
|
|
google-auth-oauthlib
|
|
|
|
requests-oauthlib;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|