2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-15 16:39:30 +00:00
|
|
|
, django
|
2022-06-16 17:23:12 +00:00
|
|
|
, django-allauth
|
|
|
|
, djangorestframework
|
|
|
|
, djangorestframework-simplejwt
|
|
|
|
, responses
|
|
|
|
, unittest-xml-reporting
|
2023-03-15 16:39:30 +00:00
|
|
|
, python
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dj-rest-auth";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "4.0.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iMerica";
|
|
|
|
repo = "dj-rest-auth";
|
2023-03-15 16:39:30 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-+ladx0b/bvvUW8zLjtG8IiWWdfPTqqm/KYbEK9uiFaU=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "coveralls>=1.11.1" "" \
|
|
|
|
--replace "==" ">="
|
|
|
|
'';
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
buildInputs = [
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
djangorestframework
|
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
passthru.optional-dependencies.with_social = [
|
2022-06-16 17:23:12 +00:00
|
|
|
django-allauth
|
2023-03-15 16:39:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
djangorestframework-simplejwt
|
|
|
|
responses
|
|
|
|
unittest-xml-reporting
|
2023-03-15 16:39:30 +00:00
|
|
|
] ++ passthru.optional-dependencies.with_social;
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
# connects to graph.facebook.com
|
|
|
|
substituteInPlace dj_rest_auth/tests/test_serializers.py \
|
|
|
|
--replace "def test_http_error" "def dont_test_http_error"
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} runtests.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [ "dj_rest_auth" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Authentication for Django Rest Framework";
|
|
|
|
homepage = "https://github.com/iMerica/dj-rest-auth";
|
|
|
|
license = licenses.mit;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|