2021-05-28 09:39:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pyjwt
|
|
|
|
, djangorestframework
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "drf-jwt";
|
2022-01-19 23:45:15 +00:00
|
|
|
version = "1.19.2";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Styria-Digital";
|
|
|
|
repo = "django-rest-framework-jwt";
|
|
|
|
rev = version;
|
2022-01-19 23:45:15 +00:00
|
|
|
hash = "sha256-bbkk78uYTG+JTzY3AyOmEVtVSgout/TETfr5N5fUto4=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyjwt
|
|
|
|
djangorestframework
|
2022-10-21 18:38:19 +00:00
|
|
|
]
|
|
|
|
++ pyjwt.optional-dependencies.crypto;
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
# requires setting up a django instance
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"rest_framework_jwt"
|
|
|
|
"rest_framework_jwt.blacklist"
|
|
|
|
# require setting DJANGO_SETTINGS_MODULE
|
|
|
|
# "rest_framework_jwt.authentication"
|
|
|
|
# "rest_framework_jwt.blacklist.views"
|
|
|
|
# "rest_framework_jwt.settings"
|
|
|
|
# "rest_framework_jwt.utils"
|
|
|
|
# "rest_framework_jwt.views"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "JSON Web Token based authentication for Django REST framework";
|
|
|
|
homepage = "https://github.com/Styria-Digital/django-rest-framework-jwt";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ dotlambda ];
|
|
|
|
};
|
|
|
|
}
|