2c76a4cb41
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, dj-database-url
|
|
, django
|
|
, django-rq
|
|
, fetchFromGitHub
|
|
, flit-core
|
|
, freezegun
|
|
, google-cloud-translate
|
|
, polib
|
|
, python
|
|
, pythonOlder
|
|
, typing-extensions
|
|
, wagtail
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "wagtail-localize";
|
|
version = "1.6";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = pname;
|
|
owner = "wagtail";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-OrRR5wLTq3icSBq+9m+MxIvkTvJP7yiGR9yzPt53q+k=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
flit-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
django
|
|
wagtail
|
|
polib
|
|
typing-extensions
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|