2021-02-05 17:12:51 +00:00
|
|
|
{ lib, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-polymorphic";
|
|
|
|
version = "2.1.2";
|
|
|
|
|
|
|
|
# PyPI tarball is missing some test files
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "0zghrq7y7g2ls38cz6y98qj5xwnn992slhb95qyp6l66d420j179";
|
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ dj-database-url ];
|
|
|
|
propagatedBuildInputs = [ django ];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} runtests.py
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/django-polymorphic/django-polymorphic";
|
|
|
|
description = "Improved Django model inheritance with automatic downcasting";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|