summary refs log tree commit diff
path: root/pkgs/development/python-modules/django-rest-auth/default.nix
blob: 5b8937fb048c93409c18ebf3127b9a02f7f0d22d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
 , buildPythonPackage
, fetchFromGitHub
, django
, django-allauth
, djangorestframework
, drf-jwt
, responses
, six
}:

buildPythonPackage rec {
  pname = "django-rest-auth";
  version = "0.9.5";

  src = fetchFromGitHub {
    owner = "Tivix";
    repo = "django-rest-auth";
    rev = version;
    hash = "sha256-rCChUHv8sTEFErDCZnPN5b5XVtMJ7JNVZwBYF3d99mY=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "djangorestframework-jwt" "drf-jwt"
  '';

  propagatedBuildInputs = [
    django
    djangorestframework
    six
  ];

  nativeCheckInputs = [
    django-allauth
    drf-jwt
    responses
  ];

  # tests are icnompatible with current django version
  doCheck = false;

  pythonImportsCheck = [ "rest_auth" ];

  meta = with lib; {
    description = "Django app that makes registration and authentication easy";
    homepage = "https://github.com/Tivix/django-rest-auth";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}