Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 96d2790061f6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 126ff4d97eb1
Choose a head ref
  • 9 commits
  • 8 files changed
  • 3 contributors

Commits on Jan 20, 2020

  1. mailman: remove unused derivation for mailman 2

    This isn't referenced anywhere, so it's just dead code.
    alyssais committed Jan 20, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    bwoodsend Brénainn Woodsend
    Copy the full SHA
    89b311f View commit details
  2. python3.pkgs.mailman: core.nix -> default.nix

    The actual upstream "mailman" name just refers to this, so we should
    use the Nixpkgs convention of default.nix.
    alyssais committed Jan 20, 2020
    Copy the full SHA
    0b9bfc0 View commit details
  3. Copy the full SHA
    38f2103 View commit details
  4. python3.pkgs.hyperkitty: use checkInputs

    The previously propagated build inputs are optional, and so are
    included in checkInputs so the tests can run, but not propagated so
    they aren't included if unneeded.
    alyssais committed Jan 20, 2020
    Copy the full SHA
    6af4de8 View commit details
  5. Copy the full SHA
    9a43cdc View commit details
  6. Copy the full SHA
    aec2382 View commit details
  7. python3.pkgs.authheaders: init at 0.12.1

    This package is a dependency of GNU Mailman 3.3.x.
    
    Co-authored-by: Jonathan Ringer <jonringer117@gmail.com>
    2 people authored and alyssais committed Jan 20, 2020
    Copy the full SHA
    fed5817 View commit details
  8. python3.pkgs.mailman: 3.2.2 -> 3.3.0

    peti authored and alyssais committed Jan 20, 2020
    Copy the full SHA
    3e26640 View commit details
  9. Copy the full SHA
    126ff4d View commit details
22 changes: 22 additions & 0 deletions pkgs/development/python-modules/authheaders/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ buildPythonPackage, fetchPypi, isPy27, lib
, authres, dnspython, dkimpy, ipaddress, publicsuffix
}:

buildPythonPackage rec {
pname = "authheaders";
version = "0.12.1";

src = fetchPypi {
inherit pname version;
sha256 = "0hf1p6ws3jma608pmcb5qsl58xg33wz2s51qqzi9zix0llcnyc97";
};

propagatedBuildInputs = [ authres dnspython dkimpy publicsuffix ]
++ lib.optional isPy27 ipaddress;

meta = {
description = "Python library for the generation of email authentication headers";
homepage = https://github.com/ValiMail/authentication-headers;
license = lib.licenses.mit;
};
}
3 changes: 2 additions & 1 deletion pkgs/development/python-modules/mailmanclient/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ stdenv, buildPythonPackage, fetchPypi, six, httplib2, requests }:
{ stdenv, buildPythonPackage, fetchPypi, isPy3k, six, httplib2, requests }:

buildPythonPackage rec {
pname = "mailmanclient";
version = "3.3.0";
disabled = !isPy3k;

src = fetchPypi {
inherit pname version;
47 changes: 0 additions & 47 deletions pkgs/servers/mail/mailman/core.nix

This file was deleted.

57 changes: 36 additions & 21 deletions pkgs/servers/mail/mailman/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
23 changes: 15 additions & 8 deletions pkgs/servers/mail/mailman/hyperkitty.nix
Original file line number Diff line number Diff line change
@@ -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 \
16 changes: 7 additions & 9 deletions pkgs/servers/mail/mailman/postorius.nix
Original file line number Diff line number Diff line change
@@ -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/;
3 changes: 2 additions & 1 deletion pkgs/servers/mail/mailman/web.nix
Original file line number Diff line number Diff line change
@@ -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 ];

10 changes: 6 additions & 4 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
@@ -224,6 +224,8 @@ in {
inherit (pkgs) augeas;
};

authheaders = callPackage ../development/python-modules/authheaders { };

authres = callPackage ../development/python-modules/authres { };

autograd = callPackage ../development/python-modules/autograd { };
@@ -817,11 +819,11 @@ in {

mail-parser = callPackage ../development/python-modules/mail-parser { };

mailman = disabledIf (!isPy3k) (callPackage ../servers/mail/mailman/core.nix { });
mailman = callPackage ../servers/mail/mailman { };

mailman-web = disabledIf (!isPy3k) (callPackage ../servers/mail/mailman/web.nix { });
mailman-web = callPackage ../servers/mail/mailman/web.nix { };

mailmanclient = disabledIf (!isPy3k) (callPackage ../development/python-modules/mailmanclient { });
mailmanclient = callPackage ../development/python-modules/mailmanclient { };

mailman-hyperkitty = callPackage ../development/python-modules/mailman-hyperkitty { };

@@ -3053,7 +3055,7 @@ in {

sunpy = callPackage ../development/python-modules/sunpy { };

hyperkitty = disabledIf (!isPy3k) (callPackage ../servers/mail/mailman/hyperkitty.nix { });
hyperkitty = callPackage ../servers/mail/mailman/hyperkitty.nix { };

robot-detection = callPackage ../development/python-modules/robot-detection {};