nixpkgs/pkgs/development/python-modules/django-polymorphic/default.nix
Martin Weinelt 0215034f25 python3.pkgs: Migrate fetchers to use hash
when they already rely on SRI hashes.
2023-03-03 23:59:29 +01:00

31 lines
807 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, python, django, dj-database-url }:
buildPythonPackage rec {
pname = "django-polymorphic";
version = "3.1";
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; [ SuperSandro2000 ];
};
}