1{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }: 2 3buildPythonPackage rec { 4 pname = "django-polymorphic"; 5 version = "2.0.2"; 6 7 # PyPI tarball is missing some test files 8 src = fetchFromGitHub { 9 owner = pname; 10 repo = pname; 11 rev = "v${version}"; 12 sha256 = "18p84kdwpfp423vb2n38h840mj3bq0j57jx3cry7c8dznpi0vfi2"; 13 }; 14 15 checkInputs = [ dj-database-url ]; 16 propagatedBuildInputs = [ django ]; 17 18 checkPhase = '' 19 ${python.interpreter} runtests.py 20 ''; 21 22 meta = { 23 homepage = https://github.com/django-polymorphic/django-polymorphic; 24 description = "Improved Django model inheritance with automatic downcasting"; 25 license = stdenv.lib.licenses.bsd3; 26 }; 27}