Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / wagtail-localize / default.nix
blobd90a71ca2582ca93c3c1936d7edc5dccd2886f70
1 { lib
2 , buildPythonPackage
3 , dj-database-url
4 , django
5 , django-rq
6 , fetchFromGitHub
7 , flit-core
8 , freezegun
9 , google-cloud-translate
10 , polib
11 , python
12 , pythonOlder
13 , typing-extensions
14 , wagtail
17 buildPythonPackage rec {
18   pname = "wagtail-localize";
19   version = "1.7";
20   format = "pyproject";
22   disabled = pythonOlder "3.7";
24   src = fetchFromGitHub {
25     repo = pname;
26     owner = "wagtail";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-Q29Nh/4Z3tYuwoodWKDl5FS+lfl9yDXN7RHn/RReCds=";
29   };
31   nativeBuildInputs = [
32     flit-core
33   ];
35   propagatedBuildInputs = [
36     django
37     wagtail
38     polib
39     typing-extensions
40   ];
42   nativeCheckInputs = [
43     dj-database-url
44     django-rq
45     freezegun
46     google-cloud-translate
47   ];
49   passthru.optional-dependencies = {
50     google = [
51       google-cloud-translate
52     ];
53   };
55   checkPhase = ''
56     # test_translate_html fails with later Beautifulsoup releases
57     rm wagtail_localize/machine_translators/tests/test_dummy_translator.py
58     ${python.interpreter} testmanage.py test
59   '';
61   meta = with lib; {
62     description = "Translation plugin for Wagtail CMS";
63     homepage = "https://github.com/wagtail/wagtail-localize";
64     changelog = "https://github.com/wagtail/wagtail-localize/blob/v${version}/CHANGELOG.md";
65     license = licenses.bsd3;
66     maintainers = with maintainers; [ sephi ];
67   };