2022-04-26 12:19:41 +02:00
|
|
|
{ lib, python3
|
|
|
|
, sassc, hyperkitty, postorius
|
2019-09-01 20:33:47 +02:00
|
|
|
}:
|
|
|
|
|
2022-04-26 12:19:41 +02:00
|
|
|
with python3.pkgs;
|
|
|
|
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
buildPythonPackage rec {
|
2021-04-14 15:32:12 +02:00
|
|
|
pname = "mailman-web";
|
2021-11-01 12:02:18 +01:00
|
|
|
version = "0.0.5";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-9pvs/VATAsMcGNrj58b/LifysEPTNhrAP57sfp4nX6Q=";
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
2021-04-14 15:32:12 +02: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.
|
2022-03-21 18:16:49 +01:00
|
|
|
sed -i '/^[[:space:]]*django/Id' setup.cfg
|
2021-04-14 15:32:12 +02: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
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
'';
|
|
|
|
|
2021-11-01 12:02:18 +01:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
propagatedBuildInputs = [ hyperkitty postorius whoosh ];
|
2019-09-11 14:48:51 +02:00
|
|
|
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
# Tries to check runtime configuration.
|
|
|
|
doCheck = false;
|
2019-09-01 20:33:47 +02:00
|
|
|
|
2021-11-01 12:02:18 +01:00
|
|
|
makeWrapperArgs = [
|
|
|
|
"--suffix PATH : ${lib.makeBinPath [ sassc ]}"
|
|
|
|
];
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Django project for Mailman 3 web interface";
|
2021-04-14 15:32:12 +02:00
|
|
|
license = licenses.gpl3Plus;
|
2021-10-14 10:59:33 +02:00
|
|
|
maintainers = with maintainers; [ qyliss m1cr0man ];
|
mailman-web: use upstream, improve NixOS module
Previously, some files were copied into the Nixpkgs tree, which meant
we wouldn't easily be able to update them, and was also just messy.
The reason it was done that way before was so that a few NixOS
options could be substituted in. Some problems with doing it this way
were that the _package_ changed depending on the values of the
settings, which is pretty strange, and also that it only allowed those
few settings to be set.
In the new model, mailman-web is a usable package without needing to
override, and I've implemented the NixOS options in a much more
flexible way. NixOS' mailman-web config file first reads the
mailman-web settings to use as defaults, but then it loads another
configuration file generated from the new services.mailman.webSettings
option, so _any_ mailman-web Django setting can be customised by the
user, rather than just the three that were supported before. I've
kept the old options, but there might not really be any good reason to
keep them.
2020-01-09 22:35:56 +01:00
|
|
|
};
|
2019-09-01 20:33:47 +02:00
|
|
|
}
|