nixpkgs/pkgs/development/python-modules/django-polymorphic/default.nix

28 lines
719 B
Nix
Raw Normal View History

{ lib, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
2017-06-27 22:12:29 +01:00
buildPythonPackage rec {
pname = "django-polymorphic";
version = "2.1.2";
2017-06-27 22:12:29 +01:00
# PyPI tarball is missing some test files
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
sha256 = "0zghrq7y7g2ls38cz6y98qj5xwnn992slhb95qyp6l66d420j179";
2017-06-27 22:12:29 +01:00
};
checkInputs = [ dj-database-url ];
2017-06-27 22:12:29 +01:00
propagatedBuildInputs = [ django ];
checkPhase = ''
${python.interpreter} runtests.py
'';
meta = with lib; {
homepage = "https://github.com/django-polymorphic/django-polymorphic";
2017-06-27 22:12:29 +01:00
description = "Improved Django model inheritance with automatic downcasting";
license = licenses.bsd3;
2017-06-27 22:12:29 +01:00
};
}