about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/djangorestframework-guardian/default.nix
blob: 4e8a941d411f1fe2728c259fec5ee1ed18387421 (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
{ lib
, buildPythonPackage
, fetchFromGitHub
, django
, django-guardian
, djangorestframework
}:

buildPythonPackage rec {
  pname = "djangorestframework-guardian";
  version = "0.3.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "rpkilby";
    repo = "django-rest-framework-guardian";
    rev = version;
    hash = "sha256-jl/VEl1pUHU8J1d5ZQSGJweNJayIGw1iVAmwID85fqw=";
  };

  postPatch = ''
    chmod +x manage.py
    patchShebangs manage.py
  '';

  propagatedBuildInputs = [
    django-guardian
    djangorestframework
  ];

  checkPhase = ''
    ./manage.py test
  '';

  pythonImportsCheck = [ "rest_framework_guardian" ];

  meta = with lib; {
    description = "Django-guardian support for Django REST Framework";
    homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
    license = licenses.bsd3;
    maintainers = with maintainers; [ ];
    # unmaintained, last compatible version is 3.x, use djangorestframework-guardian2 instead
    broken = lib.versionAtLeast django.version "4";
  };
}