summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-04-14 13:32:12 +0000
committerAlyssa Ross <hi@alyssa.is>2021-04-14 16:23:09 +0000
commit912e11a468903d481c91f6413c4eb884cbc09fa4 (patch)
treecac0489fe3b352b4369f7d4f66c35747de0c08f0
parent59917dc3a9012fa74a127cd5b107a45c711942be (diff)
downloadnixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar.gz
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar.bz2
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar.lz
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar.xz
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.tar.zst
nixpkgs-912e11a468903d481c91f6413c4eb884cbc09fa4.zip
mailman-web: 2019-09-29 -> 2021-04-10
* Make it clearer what code comments apply to
* Fix the state directory (this was changed in the update)
* Add m1cr0man as a maintaner

Co-authored-by: Lucas Savva <lucas@m1cr0man.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
-rw-r--r--nixos/modules/services/mail/mailman.nix3
-rw-r--r--pkgs/servers/mail/mailman/web.nix31
2 files changed, 21 insertions, 13 deletions
diff --git a/nixos/modules/services/mail/mailman.nix b/nixos/modules/services/mail/mailman.nix
index 832b496f31c..a5b17be349c 100644
--- a/nixos/modules/services/mail/mailman.nix
+++ b/nixos/modules/services/mail/mailman.nix
@@ -263,7 +263,8 @@ in {
       # settings_local.json is loaded.
       os.environ["SECRET_KEY"] = ""
 
-      from mailman_web.settings import *
+      from mailman_web.settings.base import *
+      from mailman_web.settings.mailman import *
 
       import json
 
diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix
index 6fe61b512a0..434f5b3191e 100644
--- a/pkgs/servers/mail/mailman/web.nix
+++ b/pkgs/servers/mail/mailman/web.nix
@@ -3,26 +3,33 @@
 }:
 
 buildPythonPackage rec {
-  pname = "mailman-web-unstable";
-  version = "2019-09-29";
+  pname = "mailman-web";
+  version = "unstable-2021-04-10";
   disabled = !isPy3k;
 
   src = fetchgit {
     url = "https://gitlab.com/mailman/mailman-web";
-    rev = "d17203b4d6bdc71c2b40891757f57a32f3de53d5";
-    sha256 = "124cxr4vfi1ibgxygk4l74q4fysx0a6pga1kk9p5wq2yvzwg9z3n";
+    rev = "19a7abe27dd3bc39c0250440de073f0adecd4da1";
+    sha256 = "0h25140n2jaisl0ri5x7gdmbypiys8vlq8dql1zmaxvq459ybxkn";
     leaveDotGit = true;
   };
 
-  # This is just so people installing from pip also get uwsgi
-  # installed, AFAICT.
-
-  # Django is depended on transitively by hyperkitty and postorius,
-  # and mailman_web has overly restrictive version bounds on it, so
-  # let's remove it.
   postPatch = ''
+    # This is just so people installing from pip also get uwsgi
+    # installed, AFAICT.
     sed -i '/^  uwsgi$/d' setup.cfg
+
+    # 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 '/^  Django/d' 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 = [ git makeWrapper setuptools-scm ];
@@ -38,7 +45,7 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Django project for Mailman 3 web interface";
-    license = licenses.gpl3;
-    maintainers = with maintainers; [ peti qyliss ];
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ peti qyliss m1cr0man ];
   };
 }