2018-03-02 03:05:55 +01:00
|
|
|
{ stdenv, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
|
2017-06-27 23:12:29 +02:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-polymorphic";
|
2018-10-24 15:43:33 +02:00
|
|
|
version = "2.0.3";
|
2017-06-27 23:12:29 +02:00
|
|
|
|
2018-03-02 03:05:55 +01:00
|
|
|
# PyPI tarball is missing some test files
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2018-10-24 15:43:33 +02:00
|
|
|
sha256 = "08qk3rbk0xlphwalkigbhqpmfaqjk1sxmlfh8zy8s8dw7fw1myk4";
|
2017-06-27 23:12:29 +02:00
|
|
|
};
|
|
|
|
|
2018-03-02 03:05:55 +01:00
|
|
|
checkInputs = [ dj-database-url ];
|
2017-06-27 23:12:29 +02:00
|
|
|
propagatedBuildInputs = [ django ];
|
|
|
|
|
2018-03-02 03:05:55 +01:00
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} runtests.py
|
|
|
|
'';
|
|
|
|
|
2017-06-27 23:12:29 +02:00
|
|
|
meta = {
|
2017-08-01 22:03:30 +02:00
|
|
|
homepage = https://github.com/django-polymorphic/django-polymorphic;
|
2017-06-27 23:12:29 +02:00
|
|
|
description = "Improved Django model inheritance with automatic downcasting";
|
|
|
|
license = stdenv.lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|