2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
2022-06-16 17:23:12 +00:00
|
|
|
, python3
|
2022-05-18 14:49:53 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
with python3.pkgs;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "HyperKitty";
|
2021-04-05 15:23:46 +00:00
|
|
|
# Note: Mailman core must be on the latest version before upgrading HyperKitty.
|
|
|
|
# See: https://gitlab.com/mailman/postorius/-/issues/516#note_544571309
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.3.5";
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-gmkiK8pIHfubbbxNdm/D6L2o722FptxYgINYdIUOn4Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
patches = [
|
|
|
|
# FIXME: backport Python 3.10 support fix, remove for next release
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/mailman/hyperkitty/-/commit/551a44a76e46931fc5c1bcb341235d8f579820be.patch";
|
|
|
|
sha256 = "sha256-5XCrvyrDEqH3JryPMoOXSlVVDLQ+PdYBqwGYxkExdvk=";
|
|
|
|
includes = [ "hyperkitty/*" ];
|
|
|
|
})
|
2022-06-26 10:26:21 +00:00
|
|
|
|
|
|
|
# Fix for Python >=3.9.13
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitlab.com/mailman/hyperkitty/-/commit/3efe7507944dbdbfcfa4c182d332528712476b28.patch";
|
|
|
|
sha256 = "sha256-yXuhTbmfDiYEXEsnz+zp+xLHRqI4GtkOhGHN+37W0iQ=";
|
|
|
|
})
|
2022-05-18 14:49:53 +00:00
|
|
|
];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
# isort is a development dependency
|
|
|
|
sed -i '/isort/d' setup.py
|
2022-02-10 20:34:41 +00:00
|
|
|
# Fix mistune imports for mistune >= 2.0.0
|
|
|
|
# https://gitlab.com/mailman/hyperkitty/-/merge_requests/379
|
|
|
|
sed -i 's/mistune.scanner/mistune.util/' hyperkitty/lib/renderer.py
|
2021-12-06 16:07:01 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
django
|
|
|
|
django-gravatar2
|
|
|
|
django-haystack
|
|
|
|
django-mailman3
|
|
|
|
django-q
|
|
|
|
django_compressor
|
2022-01-13 20:06:32 +00:00
|
|
|
django-extensions
|
2021-12-06 16:07:01 +00:00
|
|
|
djangorestframework
|
|
|
|
flufl_lock
|
|
|
|
mistune_2_0
|
|
|
|
networkx
|
|
|
|
psycopg2
|
|
|
|
python-dateutil
|
|
|
|
robot-detection
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Some of these are optional runtime dependencies that are not
|
|
|
|
# listed as dependencies in setup.py. To use these, they should be
|
|
|
|
# dependencies of the Django Python environment, but not of
|
|
|
|
# HyperKitty so they're not included for people who don't need them.
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
beautifulsoup4
|
|
|
|
elasticsearch
|
|
|
|
mock
|
|
|
|
whoosh
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
cd $NIX_BUILD_TOP/$sourceRoot
|
|
|
|
PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test \
|
|
|
|
--settings=hyperkitty.tests.settings_test hyperkitty
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.gnu.org/software/mailman/";
|
|
|
|
description = "Archiver for GNU Mailman v3";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
2021-10-17 02:12:59 +00:00
|
|
|
maintainers = with lib.maintainers; [ globin qyliss ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|