summary refs log tree commit diff
path: root/pkgs/development/python-modules/django_guardian.nix
blob: c9217955213d9a377ab85cd169ca2c1f84066223 (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
{ stdenv, buildPythonPackage, python, fetchurl
, django_environ, mock, django, six
, pytest, pytestrunner, pytestdjango, setuptools_scm
}:
buildPythonPackage rec {
  name = "django-guardian-${version}";
  version = "1.4.6";

  src = fetchurl {
    url = "mirror://pypi/d/django-guardian/${name}.tar.gz";
    sha256 = "1r3xj0ik0hh6dfak4kjndxk5v73x95nfbppgr394nhnmiayv4zc5";
  };

  buildInputs = [ pytest pytestrunner pytestdjango django_environ mock setuptools_scm ];
  propagatedBuildInputs = [ django six ];

  checkPhase = ''
    ${python.interpreter} nix_run_setup.py test --addopts="--ignore build"
  '';

  meta = with stdenv.lib; {
    description = "Per object permissions for Django";
    homepage = https://github.com/django-guardian/django-guardian;
    licenses = [ licenses.mit licenses.bsd2 ];
  };
}