Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / djangorestframework-guardian2 / default.nix
blobd2e7ea08af8ae40ecfd6c321742e37ddc2fc82c7
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , django-guardian
5 , djangorestframework
6 }:
8 buildPythonPackage rec {
9   pname = "djangorestframework-guardian2";
10   version = "0.5.0";
11   format = "setuptools";
13   src = fetchFromGitHub {
14     owner = "johnthagen";
15     repo = "django-rest-framework-guardian2";
16     rev = "v${version}";
17     hash = "sha256-aW20xEmVTAgwayWMJsabmyKNW65NftJyQANtT6JV74U=";
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/johnthagen/django-rest-framework-guardian2/";
39     license = licenses.bsd3;
40     maintainers = with maintainers; [ e1mo ];
41   };