11 buildPythonPackage rec {
12 pname = "django-polymorphic";
14 format = "setuptools";
16 src = fetchFromGitHub {
17 owner = "django-polymorphic";
18 repo = "django-polymorphic";
20 hash = "sha256-JJY+FoMPSnWuSsNIas2JedGJpdm6RfPE3E1VIjGuXIc=";
24 # Spelling of assertQuerySetEqual changed in Django >= 4.2
26 url = "https://github.com/jazzband/django-polymorphic/commit/63d291f8771847e716a37652f239e3966a3360e1.patch";
27 hash = "sha256-rvvD9zfjm8bgH1460BA5K44Oobzv1FRAYq9Rgg291B8=";
31 propagatedBuildInputs = [ django ];
33 nativeCheckInputs = [ dj-database-url ];
35 # Tests fail for Django >= 5.1.0
36 doCheck = lib.versionOlder django.version "5.1.0";
39 ${python.interpreter} runtests.py
42 pythonImportsCheck = [ "polymorphic" ];
45 homepage = "https://github.com/django-polymorphic/django-polymorphic";
46 description = "Improved Django model inheritance with automatic downcasting";
47 license = licenses.bsd3;