Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / djangorestframework-guardian / default.nix
blob4358a61b3452aa1f6fecbcb50a1e1082ae4792f9
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , django
5 , django-guardian
6 , djangorestframework
7 }:
9 buildPythonPackage rec {
10   pname = "djangorestframework-guardian";
11   version = "0.3.0";
13   src = fetchFromGitHub {
14     owner = "rpkilby";
15     repo = "django-rest-framework-guardian";
16     rev = version;
17     hash = "sha256-jl/VEl1pUHU8J1d5ZQSGJweNJayIGw1iVAmwID85fqw=";
18   };
20   postPatch = ''
21     chmod +x manage.py
22     patchShebangs manage.py
23   '';
25   propagatedBuildInputs = [
26     django-guardian
27     djangorestframework
28   ];
30   checkPhase = ''
31     ./manage.py test
32   '';
34   pythonImportsCheck = [ "rest_framework_guardian" ];
36   meta = with lib; {
37     description = "Django-guardian support for Django REST Framework";
38     homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
39     license = licenses.bsd3;
40     maintainers = with maintainers; [ ];
41     # unmaintained, last compatible version is 3.x, use djangorestframework-guardian2 instead
42     broken = lib.versionAtLeast django.version "4";
43   };