diff --git a/pkgs/development/python-modules/wagtail/default.nix b/pkgs/development/python-modules/wagtail/default.nix new file mode 100644 index 000000000000..5d14f80369e7 --- /dev/null +++ b/pkgs/development/python-modules/wagtail/default.nix @@ -0,0 +1,66 @@ +{ anyascii +, beautifulsoup4 +, buildPythonPackage +, callPackage +, django +, django-filter +, django-modelcluster +, django-taggit +, django_treebeard +, djangorestframework +, draftjs-exporter +, fetchPypi +, html5lib +, l18n +, lib +, openpyxl +, permissionedforms +, pillow +, requests +, telepath +, willow +}: + +buildPythonPackage rec { + pname = "wagtail"; + version = "4.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-VUdVG2YHfH1Q3QGx8Gvg2DuJolxlq6REZmn8fG8xgxw="; + }; + + propagatedBuildInputs = [ + django + django-modelcluster + django-taggit + django_treebeard + djangorestframework + django-filter + pillow + beautifulsoup4 + html5lib + willow + requests + openpyxl + anyascii + draftjs-exporter + permissionedforms + telepath + l18n + ]; + + # Tests are in separate derivation because they require a package that depends + # on wagtail (wagtail-factories) + doCheck = false; + + passthru.tests.wagtail = callPackage ./tests.nix {}; + + meta = with lib; { + description = "A Django content management system focused on flexibility and user experience"; + homepage = "https://github.com/wagtail/wagtail"; + changelog = "https://github.com/wagtail/wagtail/blob/v${version}/CHANGELOG.txt"; + license = licenses.bsd3; + maintainers = with maintainers; [ sephi ]; + }; +} diff --git a/pkgs/development/python-modules/wagtail/tests.nix b/pkgs/development/python-modules/wagtail/tests.nix new file mode 100644 index 000000000000..23eb87c1b17c --- /dev/null +++ b/pkgs/development/python-modules/wagtail/tests.nix @@ -0,0 +1,42 @@ +{ azure-mgmt-cdn +, azure-mgmt-frontdoor +, boto3 +, buildPythonPackage +, django-pattern-library +, elasticsearch +, freezegun +, jinja2 +, python-dateutil +, python +, pytz +, wagtail +, wagtail-factories +}: + +buildPythonPackage { + pname = "wagtail-tests"; + inherit (wagtail) src version; + format = "other"; + + dontBuild = true; + dontInstall = true; + + checkInputs = [ + wagtail + wagtail-factories + jinja2 + freezegun + elasticsearch + azure-mgmt-cdn + python-dateutil + pytz + boto3 + django-pattern-library + azure-mgmt-frontdoor + ]; + + checkPhase = '' + export DJANGO_SETTINGS_MODULE=wagtail.test.settings + ${python.interpreter} -m django test + ''; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4e490d38c2a7..19f07dd394a5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12397,6 +12397,8 @@ self: super: with self; { wadllib = callPackage ../development/python-modules/wadllib { }; + wagtail = callPackage ../development/python-modules/wagtail { }; + wagtail-factories = callPackage ../development/python-modules/wagtail-factories { }; wagtail-localize = callPackage ../development/python-modules/wagtail-localize { };