Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, django 5, django-allauth 6, djangorestframework 7, djangorestframework-simplejwt 8, responses 9, unittest-xml-reporting 10, python 11}: 12 13buildPythonPackage rec { 14 pname = "dj-rest-auth"; 15 version = "3.0.0"; 16 17 src = fetchFromGitHub { 18 owner = "iMerica"; 19 repo = "dj-rest-auth"; 20 rev = "refs/tags/${version}"; 21 hash = "sha256-wkbFUrvKhdp2Hd4QkXAvhMiaqSXFD/fgIw03nLPaO5I="; 22 }; 23 24 postPatch = '' 25 substituteInPlace setup.py \ 26 --replace "coveralls>=1.11.1" "" \ 27 --replace "==" ">=" 28 ''; 29 30 buildInputs = [ 31 django 32 ]; 33 34 propagatedBuildInputs = [ 35 djangorestframework 36 ]; 37 38 passthru.optional-dependencies.with_social = [ 39 django-allauth 40 ]; 41 42 nativeCheckInputs = [ 43 djangorestframework-simplejwt 44 responses 45 unittest-xml-reporting 46 ] ++ passthru.optional-dependencies.with_social; 47 48 preCheck = '' 49 # connects to graph.facebook.com 50 substituteInPlace dj_rest_auth/tests/test_serializers.py \ 51 --replace "def test_http_error" "def dont_test_http_error" 52 ''; 53 54 checkPhase = '' 55 runHook preCheck 56 ${python.interpreter} runtests.py 57 runHook postCheck 58 ''; 59 60 pythonImportsCheck = [ "dj_rest_auth" ]; 61 62 meta = with lib; { 63 description = "Authentication for Django Rest Framework"; 64 homepage = "https://github.com/iMerica/dj-rest-auth"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ SuperSandro2000 ]; 67 }; 68}