about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/django-polymorphic/default.nix
blob: 3a33960faf881e84f8403e065f680921bc45021f (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
{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:

buildPythonPackage rec {
  pname = "django-polymorphic";
  version = "2.0.3";

  # PyPI tarball is missing some test files
  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "v${version}";
    sha256 = "08qk3rbk0xlphwalkigbhqpmfaqjk1sxmlfh8zy8s8dw7fw1myk4";
  };

  checkInputs = [ dj-database-url ];
  propagatedBuildInputs = [ django ];

  checkPhase = ''
    ${python.interpreter} runtests.py
  '';

  meta = {
    homepage = https://github.com/django-polymorphic/django-polymorphic;
    description = "Improved Django model inheritance with automatic downcasting";
    license = stdenv.lib.licenses.bsd3;
  };
}