1{ stdenv, buildPythonPackage, python, fetchurl
2, django_environ, mock, django, six
3, pytest, pytestrunner, pytest-django, setuptools_scm
4}:
5buildPythonPackage rec {
6 pname = "django-guardian";
7 name = "${pname}-${version}";
8 version = "1.4.9";
9
10 src = fetchurl {
11 url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
12 sha256 = "c3c0ab257c9d94ce154b9ee32994e3cff8b350c384040705514e14a9fb7c8191";
13 };
14
15 buildInputs = [ pytest pytestrunner pytest-django django_environ mock setuptools_scm ];
16 propagatedBuildInputs = [ django six ];
17
18 checkPhase = ''
19 ${python.interpreter} nix_run_setup test --addopts="--ignore build"
20 '';
21
22 meta = with stdenv.lib; {
23 description = "Per object permissions for Django";
24 homepage = https://github.com/django-guardian/django-guardian;
25 license = [ licenses.mit licenses.bsd2 ];
26 };
27}