Skip to content

Commit

Permalink
python3Packages.wagtail: init at 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sephii committed Mar 20, 2023
1 parent 5f25c05 commit b6629ca
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 0 deletions.
66 changes: 66 additions & 0 deletions pkgs/development/python-modules/wagtail/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
42 changes: 42 additions & 0 deletions pkgs/development/python-modules/wagtail/tests.nix
Original file line number Diff line number Diff line change
@@ -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
'';
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit b6629ca

Please sign in to comment.