f34ce41345
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
53 lines
1.2 KiB
Nix
53 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
pythonOlder,
|
|
django,
|
|
django-stubs,
|
|
pytestCheckHook,
|
|
pytest-django,
|
|
parameterized,
|
|
}:
|
|
let
|
|
# 0.18.12 was yanked from PyPI, it refers to this issue:
|
|
# https://github.com/deschler/django-modeltranslation/issues/701
|
|
version = "0.19.5";
|
|
in
|
|
buildPythonPackage {
|
|
pname = "django-modeltranslation";
|
|
inherit version;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "deschler";
|
|
repo = "django-modeltranslation";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-wIvX9m3AGa6rLAWI56B7sEyj04g8cPIF37JWgVzbtig=";
|
|
};
|
|
|
|
# Remove all references to pytest-cov
|
|
postPatch = ''
|
|
substituteInPlace pytest.ini \
|
|
--replace "--no-cov-on-fail" "" \
|
|
--replace "--cov-report=\"\"" "" \
|
|
--replace "--cov modeltranslation" ""
|
|
'';
|
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
propagatedBuildInputs = [ django ];
|
|
|
|
nativeCheckInputs = [
|
|
django-stubs
|
|
pytestCheckHook
|
|
pytest-django
|
|
parameterized
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Translates Django models using a registration approach";
|
|
homepage = "https://github.com/deschler/django-modeltranslation";
|
|
license = licenses.bsd3;
|
|
maintainers = with maintainers; [ augustebaum ];
|
|
};
|
|
}
|