Merge pull request #218587 from sephii/python-wagtail
This commit is contained in:
commit
e3652e0735
12 changed files with 488 additions and 0 deletions
|
@ -0,0 +1,38 @@
|
|||
{ azure-common
|
||||
, azure-mgmt-core
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, lib
|
||||
, msrest
|
||||
, msrestazure
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "azure-mgmt-frontdoor";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "sha256-nJXQ/BpyOwmybNUqE4cBxq5xxZE56lqgHSTKZTIHIuU=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
msrest
|
||||
msrestazure
|
||||
azure-common
|
||||
azure-mgmt-core
|
||||
];
|
||||
|
||||
# has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "azure.mgmt.frontdoor" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Microsoft Azure Front Door Service Client Library for Python";
|
||||
homepage = "https://github.com/Azure/azure-sdk-for-python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
{ beautifulsoup4
|
||||
, buildPythonPackage
|
||||
, django
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, markdown
|
||||
, poetry-core
|
||||
, python
|
||||
, pyyaml
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "django-pattern-library";
|
||||
version = "1.0.0";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = pname;
|
||||
owner = "torchbox";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-V299HpbfNLa9cpVhBfzD41oe95xqh+ktQVMMVvm5Xao=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
django
|
||||
pyyaml
|
||||
markdown
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace poetry.masonry.api poetry.core.masonry.api
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ poetry-core ];
|
||||
|
||||
checkInputs = [
|
||||
beautifulsoup4
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
export DJANGO_SETTINGS_MODULE=tests.settings.dev
|
||||
${python.interpreter} -m django test
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "pattern_library" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "UI pattern libraries for Django templates";
|
||||
homepage = "https://github.com/torchbox/django-pattern-library/";
|
||||
changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
45
pkgs/development/python-modules/draftjs-exporter/default.nix
Normal file
45
pkgs/development/python-modules/draftjs-exporter/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ beautifulsoup4
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, html5lib
|
||||
, lib
|
||||
, lxml
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "draftjs-exporter";
|
||||
version = "2.1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "draftjs_exporter";
|
||||
owner = "springload";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-tw0r9RnQdIwcY+pqnW8fcV0o2LzmxW0MZPn5drNgK80=";
|
||||
};
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
lxml = [ lxml ];
|
||||
html5lib = [ beautifulsoup4 html5lib ];
|
||||
};
|
||||
|
||||
checkInputs = passthru.optional-dependencies.lxml ++ passthru.optional-dependencies.html5lib;
|
||||
|
||||
checkPhase = ''
|
||||
# 2 tests in this file randomly fail because they depend on the order of
|
||||
# HTML attributes
|
||||
rm tests/test_exports.py
|
||||
|
||||
${python.interpreter} -m unittest discover
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "draftjs_exporter" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Library to convert Draft.js ContentState to HTML";
|
||||
homepage = "https://github.com/springload/draftjs_exporter";
|
||||
changelog = "https://github.com/springload/draftjs_exporter/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
30
pkgs/development/python-modules/l18n/default.nix
Normal file
30
pkgs/development/python-modules/l18n/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ buildPythonPackage
|
||||
, django
|
||||
, fetchFromGitHub
|
||||
, fetchPypi
|
||||
, lib
|
||||
, pytz
|
||||
, six
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "l18n";
|
||||
version = "2021.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-GVbokNZz0XE1zCCRMlPBVPa8HAAmbCK31QPMGlpC2Eg=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pytz six ];
|
||||
|
||||
pythonImportsCheck = [ "l18n" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Locale internationalization package";
|
||||
homepage = "https://github.com/tkhyn/l18n";
|
||||
changelog = "https://github.com/tkhyn/l18n/blob/${version}/CHANGES.rst";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
{ buildPythonPackage
|
||||
, django
|
||||
, django-modelcluster
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "permissionedforms";
|
||||
version = "0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "django-permissionedforms";
|
||||
owner = "wagtail";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-DQzPGmh5UEVpGWnW3IrEVPkZZ8mdiW9J851Ej4agTDc=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
django
|
||||
];
|
||||
|
||||
checkInputs = [ django-modelcluster ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} runtests.py
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "permissionedforms" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A Django extension for creating forms that vary according to user permissions";
|
||||
homepage = "https://github.com/wagtail/permissionedforms";
|
||||
changelog = "https://github.com/wagtail/permissionedforms/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
34
pkgs/development/python-modules/telepath/default.nix
Normal file
34
pkgs/development/python-modules/telepath/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ buildPythonPackage
|
||||
, django
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, python
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "telepath";
|
||||
version = "0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "telepath";
|
||||
owner = "wagtail";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-kfEAYCXbK0HTf1Gut/APkpw2krMa6C6mU/dJ0dsqzS0=";
|
||||
};
|
||||
|
||||
checkInputs = [ django ];
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} -m django test --settings=telepath.test_settings
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "telepath" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library for exchanging data between Python and JavaScript";
|
||||
homepage = "https://github.com/wagtail/telepath";
|
||||
changelog = "https://github.com/wagtail/telepath/blob/v${version}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
{ buildPythonPackage
|
||||
, callPackage
|
||||
, factory_boy
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
, wagtail
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wagtail-factories";
|
||||
version = "4.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = pname;
|
||||
owner = "wagtail";
|
||||
rev = version;
|
||||
sha256 = "sha256-JmFWf+TODQNsSSxYD/JYVhWc82o6rJL13j5J23r8J9A=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
factory_boy
|
||||
wagtail
|
||||
];
|
||||
|
||||
# Tests require wagtail which in turn requires wagtail-factories
|
||||
# Note that pythonImportsCheck is not used because it requires a Django app
|
||||
doCheck = false;
|
||||
|
||||
passthru.tests.wagtail-factories = callPackage ./tests.nix { };
|
||||
|
||||
meta = with lib; {
|
||||
description = "Factory boy classes for wagtail";
|
||||
homepage = "https://github.com/wagtail/wagtail-factories";
|
||||
changelog = "https://github.com/wagtail/wagtail-factories/blob/${version}/CHANGES";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
};
|
||||
}
|
24
pkgs/development/python-modules/wagtail-factories/tests.nix
Normal file
24
pkgs/development/python-modules/wagtail-factories/tests.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ buildPythonPackage
|
||||
, django-pattern-library
|
||||
, pytest-django
|
||||
, pytestCheckHook
|
||||
, wagtail
|
||||
, wagtail-factories
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "wagtail-factories-tests";
|
||||
format = "other";
|
||||
inherit (wagtail-factories) src version;
|
||||
|
||||
dontBuild = true;
|
||||
dontInstall = true;
|
||||
|
||||
checkInputs = [
|
||||
django-pattern-library
|
||||
pytestCheckHook
|
||||
pytest-django
|
||||
wagtail
|
||||
wagtail-factories
|
||||
];
|
||||
}
|
59
pkgs/development/python-modules/wagtail-localize/default.nix
Normal file
59
pkgs/development/python-modules/wagtail-localize/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ buildPythonPackage
|
||||
, dj-database-url
|
||||
, django
|
||||
, django-rq
|
||||
, fetchFromGitHub
|
||||
, flit-core
|
||||
, freezegun
|
||||
, google-cloud-translate
|
||||
, lib
|
||||
, polib
|
||||
, python
|
||||
, typing-extensions
|
||||
, wagtail
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "wagtail-localize";
|
||||
version = "1.5";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = pname;
|
||||
owner = "wagtail";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-aNz4OoUUXWMCahMxuYBxvNWnw7Inxd5svBgwLgoirW8=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
django
|
||||
wagtail
|
||||
polib
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
dj-database-url
|
||||
django-rq
|
||||
freezegun
|
||||
google-cloud-translate
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ flit-core ];
|
||||
|
||||
passthru.optional-dependencies = {
|
||||
google = [ google-cloud-translate ];
|
||||
};
|
||||
|
||||
checkPhase = ''
|
||||
${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 ];
|
||||
};
|
||||
}
|
66
pkgs/development/python-modules/wagtail/default.nix
Normal file
66
pkgs/development/python-modules/wagtail/default.nix
Normal file
|
@ -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
pkgs/development/python-modules/wagtail/tests.nix
Normal file
42
pkgs/development/python-modules/wagtail/tests.nix
Normal file
|
@ -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
|
||||
'';
|
||||
}
|
|
@ -985,6 +985,8 @@ self: super: with self; {
|
|||
|
||||
azure-mgmt-extendedlocation = callPackage ../development/python-modules/azure-mgmt-extendedlocation { };
|
||||
|
||||
azure-mgmt-frontdoor = callPackage ../development/python-modules/azure-mgmt-frontdoor { };
|
||||
|
||||
azure-mgmt-hanaonazure = callPackage ../development/python-modules/azure-mgmt-hanaonazure { };
|
||||
|
||||
azure-mgmt-hdinsight = callPackage ../development/python-modules/azure-mgmt-hdinsight { };
|
||||
|
@ -2671,6 +2673,8 @@ self: super: with self; {
|
|||
|
||||
django-paintstore = callPackage ../development/python-modules/django-paintstore { };
|
||||
|
||||
django-pattern-library = callPackage ../development/python-modules/django-pattern-library { };
|
||||
|
||||
django-pglocks = callPackage ../development/python-modules/django-pglocks { };
|
||||
|
||||
django-phonenumber-field = callPackage ../development/python-modules/django-phonenumber-field { };
|
||||
|
@ -2877,6 +2881,8 @@ self: super: with self; {
|
|||
|
||||
dpkt = callPackage ../development/python-modules/dpkt { };
|
||||
|
||||
draftjs-exporter = callPackage ../development/python-modules/draftjs-exporter { };
|
||||
|
||||
dragonfly = callPackage ../development/python-modules/dragonfly { };
|
||||
|
||||
drawille = callPackage ../development/python-modules/drawille { };
|
||||
|
@ -5303,6 +5309,8 @@ self: super: with self; {
|
|||
|
||||
kubernetes = callPackage ../development/python-modules/kubernetes { };
|
||||
|
||||
l18n = callPackage ../development/python-modules/l18n { };
|
||||
|
||||
labelbox = callPackage ../development/python-modules/labelbox { };
|
||||
|
||||
labgrid = callPackage ../development/python-modules/labgrid { };
|
||||
|
@ -7155,6 +7163,8 @@ self: super: with self; {
|
|||
|
||||
periodictable = callPackage ../development/python-modules/periodictable { };
|
||||
|
||||
permissionedforms = callPackage ../development/python-modules/permissionedforms { };
|
||||
|
||||
persim = callPackage ../development/python-modules/persim { };
|
||||
|
||||
persistent = callPackage ../development/python-modules/persistent { };
|
||||
|
@ -11489,6 +11499,8 @@ self: super: with self; {
|
|||
|
||||
telegraph = callPackage ../development/python-modules/telegraph { };
|
||||
|
||||
telepath = callPackage ../development/python-modules/telepath { };
|
||||
|
||||
telethon = callPackage ../development/python-modules/telethon {
|
||||
inherit (pkgs) openssl;
|
||||
};
|
||||
|
@ -12415,6 +12427,12 @@ 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 { };
|
||||
|
||||
waitress = callPackage ../development/python-modules/waitress { };
|
||||
|
||||
waitress-django = callPackage ../development/python-modules/waitress-django { };
|
||||
|
|
Loading…
Reference in a new issue