2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
dj-database-url,
|
|
|
|
django,
|
|
|
|
django-rq,
|
|
|
|
fetchFromGitHub,
|
|
|
|
flit-core,
|
|
|
|
freezegun,
|
|
|
|
google-cloud-translate,
|
|
|
|
polib,
|
|
|
|
python,
|
|
|
|
pythonOlder,
|
|
|
|
typing-extensions,
|
|
|
|
wagtail,
|
|
|
|
wagtail-modeladmin,
|
2023-03-30 22:05:00 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "wagtail-localize";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "1.10";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
2023-03-30 22:05:00 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
src = fetchFromGitHub {
|
2024-02-29 20:09:43 +00:00
|
|
|
repo = "wagtail-localize";
|
2023-03-30 22:05:00 +00:00
|
|
|
owner = "wagtail";
|
2023-07-15 17:15:38 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-khGzJj7LBxz5WPU8l20CmQjC9p5umk6spSyMMHBBguc=";
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
build-system = [ flit-core ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
dependencies = [
|
2023-03-30 22:05:00 +00:00
|
|
|
django
|
|
|
|
wagtail
|
|
|
|
polib
|
|
|
|
typing-extensions
|
2024-02-29 20:09:43 +00:00
|
|
|
wagtail-modeladmin
|
2023-03-30 22:05:00 +00:00
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [
|
2023-03-30 22:05:00 +00:00
|
|
|
dj-database-url
|
|
|
|
django-rq
|
|
|
|
freezegun
|
|
|
|
google-cloud-translate
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-06-05 15:53:02 +00:00
|
|
|
google = [ google-cloud-translate ];
|
2023-03-30 22:05:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkPhase = ''
|
2023-07-15 17:15:38 +00:00
|
|
|
# test_translate_html fails with later Beautifulsoup releases
|
|
|
|
rm wagtail_localize/machine_translators/tests/test_dummy_translator.py
|
2023-03-30 22:05:00 +00:00
|
|
|
${python.interpreter} testmanage.py test
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Translation plugin for Wagtail CMS";
|
|
|
|
homepage = "https://github.com/wagtail/wagtail-localize";
|
|
|
|
changelog = "https://github.com/wagtail/wagtail-localize/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ sephi ];
|
|
|
|
};
|
|
|
|
}
|