depot/third_party/nixpkgs/pkgs/development/python-modules/django-polymorphic/default.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

38 lines
829 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
python,
django,
dj-database-url,
}:
buildPythonPackage rec {
pname = "django-polymorphic";
version = "3.1";
format = "setuptools";
src = fetchFromGitHub {
owner = "django-polymorphic";
repo = "django-polymorphic";
rev = "v${version}";
hash = "sha256-JJY+FoMPSnWuSsNIas2JedGJpdm6RfPE3E1VIjGuXIc=";
};
propagatedBuildInputs = [ django ];
nativeCheckInputs = [ dj-database-url ];
checkPhase = ''
${python.interpreter} runtests.py
'';
pythonImportsCheck = [ "polymorphic" ];
meta = with lib; {
homepage = "https://github.com/django-polymorphic/django-polymorphic";
description = "Improved Django model inheritance with automatic downcasting";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};
}