2022-01-13 20:06:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
|
|
|
|
# propagates
|
|
|
|
, django
|
|
|
|
, jwcrypto
|
|
|
|
, requests
|
|
|
|
, oauthlib
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, djangorestframework
|
|
|
|
, pytest-django
|
|
|
|
, pytest-xdist
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-oauth-toolkit";
|
2022-01-26 04:04:25 +00:00
|
|
|
version = "1.7.0";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jazzband";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-26 04:04:25 +00:00
|
|
|
sha256 = "0rp7pjif54yvdxfxn0pnf8ha3fjxspnx1ijyr1f8npwk2x5vnvhb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i '/cov/d' tox.ini
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
django
|
|
|
|
jwcrypto
|
|
|
|
oauthlib
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
DJANGO_SETTINGS_MODULE = "tests.settings";
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
djangorestframework
|
|
|
|
pytest-django
|
|
|
|
pytest-xdist
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Failed to get a valid response from authentication server. Status code: 404, Reason: Not Found.
|
|
|
|
"test_response_when_auth_server_response_return_404"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "OAuth2 goodies for the Djangonauts";
|
|
|
|
homepage = "https://github.com/jazzband/django-oauth-toolkit";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|