2022-05-25 20:01:44 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-03-03 20:01:41 +01:00
|
|
|
, django
|
2022-05-25 20:01:44 +02:00
|
|
|
, django-allauth
|
|
|
|
, djangorestframework
|
|
|
|
, djangorestframework-simplejwt
|
|
|
|
, responses
|
|
|
|
, unittest-xml-reporting
|
2023-03-03 20:01:41 +01:00
|
|
|
, python
|
2022-05-25 20:01:44 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dj-rest-auth";
|
2023-02-27 02:14:16 +01:00
|
|
|
version = "3.0.0";
|
2022-05-25 20:01:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iMerica";
|
|
|
|
repo = "dj-rest-auth";
|
2023-02-27 02:14:16 +01:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-03 01:48:06 +01:00
|
|
|
hash = "sha256-wkbFUrvKhdp2Hd4QkXAvhMiaqSXFD/fgIw03nLPaO5I=";
|
2022-05-25 20:01:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "coveralls>=1.11.1" "" \
|
|
|
|
--replace "==" ">="
|
|
|
|
'';
|
|
|
|
|
2023-03-03 20:01:41 +01:00
|
|
|
buildInputs = [
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
2022-05-25 20:01:44 +02:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
djangorestframework
|
|
|
|
];
|
|
|
|
|
2023-03-03 20:01:41 +01:00
|
|
|
passthru.optional-dependencies.with_social = [
|
2022-05-25 20:01:44 +02:00
|
|
|
django-allauth
|
2023-03-03 20:01:41 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
2022-05-25 20:01:44 +02:00
|
|
|
djangorestframework-simplejwt
|
|
|
|
responses
|
|
|
|
unittest-xml-reporting
|
2023-03-03 20:01:41 +01: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-05-25 20:01:44 +02: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 ];
|
|
|
|
};
|
|
|
|
}
|