depot/third_party/nixpkgs/pkgs/servers/mail/mailman/web.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

47 lines
1.3 KiB
Nix

{ lib, python3, fetchPypi
, sassc, hyperkitty, postorius
}:
with python3.pkgs;
buildPythonPackage rec {
pname = "mailman-web";
version = "0.0.6";
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-UWdqrcx529r6kwgf0YEHiDrpZlGoUBR6OdYtHMTPMGY=";
};
postPatch = ''
# Django is depended on transitively by hyperkitty and postorius,
# and mailman_web has overly restrictive version bounds on it, so
# let's remove it.
sed -i '/^[[:space:]]*django/Id' setup.cfg
# 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
'';
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ hyperkitty postorius whoosh ];
# Tries to check runtime configuration.
doCheck = false;
makeWrapperArgs = [
"--suffix PATH : ${lib.makeBinPath [ sassc ]}"
];
meta = with lib; {
homepage = "https://gitlab.com/mailman/mailman-web";
description = "Django project for Mailman 3 web interface";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ qyliss m1cr0man ];
};
}