2021-12-06 16:07:01 +00:00
|
|
|
{ buildPythonPackage, lib, fetchPypi, pythonOlder
|
|
|
|
, sassc, hyperkitty, postorius, whoosh, setuptools-scm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-04-13 19:44:15 +00:00
|
|
|
pname = "mailman-web";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "0.0.5";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-9pvs/VATAsMcGNrj58b/LifysEPTNhrAP57sfp4nX6Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-04-15 00:37:46 +00:00
|
|
|
# Django is depended on transitively by hyperkitty and postorius,
|
|
|
|
# and mailman_web has overly restrictive version bounds on it, so
|
|
|
|
# let's remove it.
|
2020-06-15 15:56:04 +00:00
|
|
|
sed -i '/^ Django/d' setup.cfg
|
2021-04-15 00:37:46 +00:00
|
|
|
|
|
|
|
# Upstream seems to mostly target installing on top of existing
|
|
|
|
# distributions, and uses a path appropriate for that, but we are
|
|
|
|
# a distribution, so use a state directory appropriate for a
|
|
|
|
# distro package.
|
|
|
|
substituteInPlace mailman_web/settings/base.py \
|
|
|
|
--replace /opt/mailman/web /var/lib/mailman-web
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ hyperkitty postorius whoosh ];
|
|
|
|
|
|
|
|
# Tries to check runtime configuration.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--suffix PATH : ${lib.makeBinPath [ sassc ]}"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Django project for Mailman 3 web interface";
|
2021-04-13 19:44:15 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2021-10-17 02:12:59 +00:00
|
|
|
maintainers = with maintainers; [ qyliss m1cr0man ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|