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-03-15 16:39:30 +00:00
|
|
|
version = "3.0.0";
|
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}";
|
|
|
|
hash = "sha256-wkbFUrvKhdp2Hd4QkXAvhMiaqSXFD/fgIw03nLPaO5I=";
|
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;
|
|
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
|
|
};
|
|
|
|
}
|