summary refs log tree commit diff
path: root/pkgs/servers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/servers')
-rw-r--r--pkgs/servers/mail/mailman/core.nix47
-rw-r--r--pkgs/servers/mail/mailman/default.nix57
-rw-r--r--pkgs/servers/mail/mailman/hyperkitty.nix23
-rw-r--r--pkgs/servers/mail/mailman/postorius.nix16
-rw-r--r--pkgs/servers/mail/mailman/web.nix3
-rw-r--r--pkgs/servers/web-apps/matomo/default.nix4
6 files changed, 62 insertions, 88 deletions
diff --git a/pkgs/servers/mail/mailman/core.nix b/pkgs/servers/mail/mailman/core.nix
deleted file mode 100644
index 1ba220039ea..00000000000
--- a/pkgs/servers/mail/mailman/core.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ stdenv, buildPythonPackage, fetchPypi, alembic, aiosmtpd, dnspython
-, flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib
-, requests, zope_configuration, click, falcon, importlib-resources
-, zope_component, lynx, postfix
-}:
-
-buildPythonPackage rec {
-  pname = "mailman";
-  version = "3.2.2";
-
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "09s9p5pb8gff6zblwidyq830yfgcvv50p5drdaxj1qpy8w46lvc6";
-  };
-
-  propagatedBuildInputs = [
-    alembic aiosmtpd click dnspython falcon flufl_bounce flufl_i18n flufl_lock
-    importlib-resources lazr_config passlib requests zope_configuration
-    zope_component
-  ];
-
-  patchPhase = ''
-    substituteInPlace src/mailman/config/postfix.cfg \
-      --replace /usr/sbin/postmap ${postfix}/bin/postmap
-    substituteInPlace src/mailman/config/schema.cfg \
-      --replace /usr/bin/lynx ${lynx}/bin/lynx
-  '';
-
-  # Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
-  # them in shell code breaks this assumption. The proper way to use mailman is
-  # to create a specialized python interpreter:
-  #
-  #   python37.withPackages (ps: [ps.mailman])
-  #
-  # This gives a properly wrapped 'mailman' command plus an interpreter that
-  # has all the necessary search paths to execute unwrapped 'master' and
-  # 'runner' scripts. The setup is a little tricky, but fortunately NixOS is
-  # about to get a OS module that takes care of those details.
-  dontWrapPythonPrograms = true;
-
-  meta = {
-    homepage = https://www.gnu.org/software/mailman/;
-    description = "Free software for managing electronic mail discussion and newsletter lists";
-    license = stdenv.lib.licenses.gpl3Plus;
-    maintainers = with stdenv.lib.maintainers; [ peti ];
-  };
-}
diff --git a/pkgs/servers/mail/mailman/default.nix b/pkgs/servers/mail/mailman/default.nix
index e9f66b92be2..8e763800f65 100644
--- a/pkgs/servers/mail/mailman/default.nix
+++ b/pkgs/servers/mail/mailman/default.nix
@@ -1,33 +1,48 @@
-{ stdenv, fetchurl, python2 }:
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k, alembic, aiosmtpd, dnspython
+, flufl_bounce, flufl_i18n, flufl_lock, lazr_config, lazr_delegates, passlib
+, requests, zope_configuration, click, falcon, importlib-resources
+, zope_component, lynx, postfix, authheaders, gunicorn
+}:
 
-stdenv.mkDerivation rec {
+buildPythonPackage rec {
   pname = "mailman";
-  version = "2.1.29";
+  version = "3.3.0";
+  disabled = !isPy3k;
 
-  src = fetchurl {
-    url = "mirror://gnu/mailman/${pname}-${version}.tgz";
-    sha256 = "0b0dpwf6ap260791c7lg2vpw30llf19hymbf2hja3s016rqp5243";
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1qph9i93ndahfxi3bb2sd0kjm2c0pkh844ai6zacfmvihl1k3pvy";
   };
 
-  buildInputs = [ python2 python2.pkgs.dnspython ];
-
-  patches = [ ./fix-var-prefix.patch ];
-
-  configureFlags = [
-    "--without-permcheck"
-    "--with-cgi-ext=.cgi"
-    "--with-var-prefix=/var/lib/mailman"
+  propagatedBuildInputs = [
+    alembic aiosmtpd click dnspython falcon flufl_bounce flufl_i18n flufl_lock
+    importlib-resources lazr_config passlib requests zope_configuration
+    zope_component authheaders gunicorn
   ];
 
-  installTargets = "doinstall"; # Leave out the 'update' target that's implied by 'install'.
-
-  makeFlags = [ "DIRSETGID=:" ];
+  patchPhase = ''
+    substituteInPlace src/mailman/config/postfix.cfg \
+      --replace /usr/sbin/postmap ${postfix}/bin/postmap
+    substituteInPlace src/mailman/config/schema.cfg \
+      --replace /usr/bin/lynx ${lynx}/bin/lynx
+  '';
+
+  # Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping
+  # them in shell code breaks this assumption. The proper way to use mailman is
+  # to create a specialized python interpreter:
+  #
+  #   python37.withPackages (ps: [ps.mailman])
+  #
+  # This gives a properly wrapped 'mailman' command plus an interpreter that
+  # has all the necessary search paths to execute unwrapped 'master' and
+  # 'runner' scripts. The setup is a little tricky, but fortunately NixOS is
+  # about to get a OS module that takes care of those details.
+  dontWrapPythonPrograms = true;
 
   meta = {
     homepage = https://www.gnu.org/software/mailman/;
-    description = "Free software for managing electronic mail discussion and e-newsletter lists";
-    license = stdenv.lib.licenses.gpl2Plus;
-    platforms = stdenv.lib.platforms.linux;
-    maintainers = [ stdenv.lib.maintainers.peti ];
+    description = "Free software for managing electronic mail discussion and newsletter lists";
+    license = stdenv.lib.licenses.gpl3Plus;
+    maintainers = with stdenv.lib.maintainers; [ peti ];
   };
 }
diff --git a/pkgs/servers/mail/mailman/hyperkitty.nix b/pkgs/servers/mail/mailman/hyperkitty.nix
index 8f060da3446..fedd6c9f759 100644
--- a/pkgs/servers/mail/mailman/hyperkitty.nix
+++ b/pkgs/servers/mail/mailman/hyperkitty.nix
@@ -1,27 +1,34 @@
-{ stdenv, buildPythonPackage, fetchPypi, coverage, mock
+{ stdenv, buildPythonPackage, fetchPypi, isPy3k, isort, coverage, mock
 , robot-detection, django_extensions, rjsmin, cssmin, django-mailman3
-, django-haystack, lockfile, networkx, dateutil, defusedxml
+, django-haystack, flufl_lock, networkx, dateutil, defusedxml
 , django-paintstore, djangorestframework, django, django-q
-, django_compressor, beautifulsoup4, six, psycopg2, whoosh
+, django_compressor, beautifulsoup4, six, psycopg2, whoosh, elasticsearch
 }:
 
 buildPythonPackage rec {
   pname = "HyperKitty";
-  version = "1.2.2";
+  version = "1.3.2";
+  disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1z2zswlml6nppxhzw9a4nrj7i5wsxd29s3q78ka1rwr5m5n7s1rz";
+    sha256 = "092fkv0xyf5vgj33xwq0mh9h5c5d56ifwimaqbfpx5cwc6yivb88";
   };
 
-  buildInputs = [ coverage mock ];
+  nativeBuildInputs = [ isort ];
   propagatedBuildInputs = [
     robot-detection django_extensions rjsmin cssmin django-mailman3
-    django-haystack lockfile networkx dateutil defusedxml
+    django-haystack flufl_lock networkx dateutil defusedxml
     django-paintstore djangorestframework django django-q
-    django_compressor beautifulsoup4 six psycopg2 whoosh
+    django_compressor six psycopg2 isort
   ];
 
+  # 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.
+  checkInputs = [ beautifulsoup4 coverage elasticsearch mock whoosh ];
+
   checkPhase = ''
     cd $NIX_BUILD_TOP/$sourceRoot
     PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test \
diff --git a/pkgs/servers/mail/mailman/postorius.nix b/pkgs/servers/mail/mailman/postorius.nix
index 871f2ea244d..bcb92051fc8 100644
--- a/pkgs/servers/mail/mailman/postorius.nix
+++ b/pkgs/servers/mail/mailman/postorius.nix
@@ -1,23 +1,21 @@
 { stdenv, buildPythonPackage, fetchPypi, beautifulsoup4, vcrpy, mock
-, django-mailman3, mailmanclient
+, django-mailman3, mailmanclient, readme_renderer
 }:
 
 buildPythonPackage rec {
   pname = "postorius";
-  version = "1.2.4";
+  version = "1.3.2";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "1722lnscxfl8wdigf5d80d1qmd5gblr439wa989jxlww0wkjg9fl";
+    sha256 = "0wrm0hda7ym9qaygxirqaaii66ndmgyy7gx8wqdg07pfx14zcyja";
   };
 
-  buildInputs = [ beautifulsoup4 vcrpy mock ];
-  propagatedBuildInputs = [ django-mailman3 ];
+  propagatedBuildInputs = [ django-mailman3 readme_renderer ];
+  checkInputs = [ beautifulsoup4 vcrpy mock ];
 
-  checkPhase = ''
-    cd $NIX_BUILD_TOP/$sourceRoot
-    PYTHONPATH=.:$PYTHONPATH python example_project/manage.py test --settings=test_settings postorius
-  '';
+  # Tries to connect to database.
+  doCheck = false;
 
   meta = {
     homepage = https://www.gnu.org/software/mailman/;
diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix
index b0ead765a60..ec16775b1d4 100644
--- a/pkgs/servers/mail/mailman/web.nix
+++ b/pkgs/servers/mail/mailman/web.nix
@@ -1,4 +1,4 @@
-{ stdenv, python, hyperkitty, postorius, buildPythonPackage
+{ stdenv, python, hyperkitty, postorius, buildPythonPackage, isPy3k
 , serverEMail ? "postmaster@example.org"
 , archiverKey ? "SecretArchiverAPIKey"
 , allowedHosts ? []
@@ -17,6 +17,7 @@ in
 
 buildPythonPackage {
   name = "mailman-web-0";
+  disabled = !isPy3k;
 
   propagatedBuildInputs = [ hyperkitty postorius ];
 
diff --git a/pkgs/servers/web-apps/matomo/default.nix b/pkgs/servers/web-apps/matomo/default.nix
index 5c88b8efb4a..d5f0b7057f0 100644
--- a/pkgs/servers/web-apps/matomo/default.nix
+++ b/pkgs/servers/web-apps/matomo/default.nix
@@ -3,8 +3,8 @@
 let
   versions = {
     matomo = {
-      version = "3.13.0";
-      sha256 = "0h4jqibb86zw5l26r927qrbjhba8c79pc4xp3hgpi25p3fjncax8";
+      version = "3.13.1";
+      sha256 = "071m3sw3rrhlccbwdyklcn8rwp4mcnii5m2a7zmgx3rv87i9n2ni";
     };
 
     matomo-beta = {