2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, defusedxml
|
|
|
|
, django
|
|
|
|
, django-gravatar2
|
|
|
|
, django-haystack
|
|
|
|
, django-mailman3
|
|
|
|
, django-paintstore
|
|
|
|
, 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
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, beautifulsoup4
|
|
|
|
, elasticsearch
|
|
|
|
, mock
|
|
|
|
, whoosh
|
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
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|