c7cb07f092
GitOrigin-RevId: 1536926ef5621b09bba54035ae2bb6d806d72ac8
70 lines
1.4 KiB
Nix
70 lines
1.4 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, dj-database-url
|
|
, django
|
|
, django-rq
|
|
, fetchFromGitHub
|
|
, flit-core
|
|
, freezegun
|
|
, google-cloud-translate
|
|
, polib
|
|
, python
|
|
, pythonOlder
|
|
, typing-extensions
|
|
, wagtail
|
|
, wagtail-modeladmin
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "wagtail-localize";
|
|
version = "1.8.1";
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "wagtail-localize";
|
|
owner = "wagtail";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-WOkixwcGvsH4vgL7KAQeeGtoh3+Usr9drXb3Uho1AS0=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
flit-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
wagtail
|
|
polib
|
|
typing-extensions
|
|
wagtail-modeladmin
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
dj-database-url
|
|
django-rq
|
|
freezegun
|
|
google-cloud-translate
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
google = [
|
|
google-cloud-translate
|
|
];
|
|
};
|
|
|
|
checkPhase = ''
|
|
# test_translate_html fails with later Beautifulsoup releases
|
|
rm wagtail_localize/machine_translators/tests/test_dummy_translator.py
|
|
${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 ];
|
|
};
|
|
}
|