Merge pull request #142153 from Artturin/mailmanbuildfix

Artturi 6aded65e 7907b768

Changed files
+83 -47
pkgs
development
python-modules
falcon
mailman-hyperkitty
mujson
servers
top-level
+24 -6
pkgs/development/python-modules/falcon/default.nix
···
{ lib
, buildPythonPackage
-
, fetchPypi
, pythonOlder
+
, fetchPypi
+
, pytestCheckHook
, aiofiles
, cbor2
+
, ddt
+
, gunicorn
, httpx
+
, hypercorn
+
, jsonschema
, msgpack
+
, mujson
+
, nose
+
, orjson
, pecan
, pytest-asyncio
-
, pytestCheckHook
+
, python-mimeparse
, pyyaml
+
, rapidjson
, requests
, testtools
+
, ujson
+
, uvicorn
, websockets
}:
···
checkInputs = [
aiofiles
cbor2
+
ddt
+
gunicorn
httpx
+
hypercorn
+
jsonschema
msgpack
+
mujson
+
nose
+
orjson
pecan
pytest-asyncio
pytestCheckHook
+
python-mimeparse
pyyaml
+
rapidjson
requests
testtools
+
ujson
+
uvicorn
websockets
];
disabledTestPaths = [
# missing optional nuts package
"falcon/bench/nuts/nuts/tests/test_functional.py"
-
# missing optional mujson package
-
"tests/test_media_handlers.py"
-
# tries to run uvicorn binary and doesn't find it
-
"tests/asgi/test_asgi_servers.py"
];
meta = with lib; {
+2 -2
pkgs/development/python-modules/mailman-hyperkitty/default.nix
···
buildPythonPackage rec {
pname = "mailman-hyperkitty";
-
version = "1.1.0";
+
version = "1.2.0";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchPypi {
inherit pname version;
-
sha256 = "1lfqa9admhvdv71f528jmz2wl0i5cv77v6l64px2pm4zqr9ckkjx";
+
sha256 = "sha256-EQBx1KX3z/Wv3QAHOi+s/ihLOjpiupIQBYyE6IPbJto=";
};
propagatedBuildInputs = [
+32
pkgs/development/python-modules/mujson/default.nix
···
+
{ lib
+
, buildPythonPackage
+
, fetchPypi
+
}:
+
+
buildPythonPackage rec {
+
pname = "mujson";
+
version = "1.4";
+
+
src = fetchPypi {
+
inherit pname version;
+
sha256 = "sha256-J9nPGxDkLQje6AkL9cewNqmQ7Z+00TXBEr3p71E2cnE=";
+
};
+
+
# LICENSE file missing from src
+
# https://github.com/mattgiles/mujson/issues/8
+
postPatch = ''
+
substituteInPlace setup.cfg \
+
--replace "license_file = LICENSE" ""
+
'';
+
+
# No tests
+
doCheck = false;
+
pythonImportsCheck = [ "mujson" ];
+
+
meta = with lib; {
+
description = "Use the fastest JSON functions available at import time";
+
homepage = "https://github.com/mattgiles/mujson";
+
license = licenses.mit;
+
maintainers = with maintainers; [ artturin ];
+
};
+
}
+4 -7
pkgs/servers/mail/mailman/default.nix
···
-
{ lib, python3, fetchPypi, fetchpatch, pythonOlder, postfix, lynx
+
{ lib, buildPythonPackage, fetchPypi, fetchpatch, pythonOlder, python3, postfix, lynx
}:
let
-
py = python3.override {
+
# Mailman does not support sqlalchemy >= 1.4 https://gitlab.com/mailman/mailman/-/issues/845
+
pythonOverride = python3.override {
packageOverrides = self: super: {
-
# https://gitlab.com/mailman/mailman/-/issues/845
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.24";
src = oldAttrs.src.override {
···
});
};
};
-
in
-
-
with py.pkgs;
buildPythonPackage rec {
pname = "mailman";
···
sha256 = "12mgxs1ndhdjjkydx48b95na9k9h0disfqgrr6wxx7vda6dqvcwz";
};
-
propagatedBuildInputs = [
+
propagatedBuildInputs = with pythonOverride.pkgs; [
aiosmtpd
alembic
authheaders
+6 -12
pkgs/servers/mail/mailman/hyperkitty.nix
···
{ lib
, buildPythonPackage
-
, fetchFromGitLab
-
, isPy3k
+
, fetchPypi
+
, pythonOlder
# dependencies
, defusedxml
···
pname = "HyperKitty";
# Note: Mailman core must be on the latest version before upgrading HyperKitty.
# See: https://gitlab.com/mailman/postorius/-/issues/516#note_544571309
-
#
-
# Update to next stable version > 1.3.4 that has fixed tests, see
-
# https://gitlab.com/mailman/django-mailman3/-/issues/48
version = "1.3.5";
-
disabled = !isPy3k;
+
disabled = pythonOlder "3.8";
-
src = fetchFromGitLab {
-
domain = "gitlab.com";
-
owner = "mailman";
-
repo = "hyperkitty";
-
rev = version;
-
sha256 = "0v70r0r6w0q56hk2hw1qp3ci0bwd9x8inf4gai6ybjqjfskqrxi4";
+
src = fetchPypi {
+
inherit pname version;
+
sha256 = "sha256-gmkiK8pIHfubbbxNdm/D6L2o722FptxYgINYdIUOn4Y=";
};
postPatch = ''
+2 -2
pkgs/servers/mail/mailman/postorius.nix
···
pname = "postorius";
# Note: Mailman core must be on the latest version before upgrading Postorious.
# See: https://gitlab.com/mailman/postorius/-/issues/516#note_544571309
-
version = "1.3.5";
+
version = "1.3.6";
src = fetchPypi {
inherit pname version;
-
sha256 = "0f23c6542bf0f6e6364d678c094ee5804acfe59ecbcc0e944bc4c13834e24e80";
+
sha256 = "sha256-KwzEU9IfcQ6YPZu3jPuFrd6ux/3e2pzoLfTrak/aGmg=";
};
propagatedBuildInputs = [ django-mailman3 readme_renderer ];
+11 -18
pkgs/servers/mail/mailman/web.nix
···
-
{ buildPythonPackage, lib, fetchgit, isPy3k
-
, git, makeWrapper, sassc, hyperkitty, postorius, whoosh, setuptools-scm
+
{ buildPythonPackage, lib, fetchPypi, pythonOlder
+
, sassc, hyperkitty, postorius, whoosh, setuptools-scm
}:
buildPythonPackage rec {
pname = "mailman-web";
-
version = "unstable-2021-04-10";
-
disabled = !isPy3k;
+
version = "0.0.5";
+
disabled = pythonOlder "3.8";
-
src = fetchgit {
-
url = "https://gitlab.com/mailman/mailman-web";
-
rev = "19a7abe27dd3bc39c0250440de073f0adecd4da1";
-
sha256 = "0h25140n2jaisl0ri5x7gdmbypiys8vlq8dql1zmaxvq459ybxkn";
-
leaveDotGit = true;
+
src = fetchPypi {
+
inherit pname version;
+
sha256 = "sha256-9pvs/VATAsMcGNrj58b/LifysEPTNhrAP57sfp4nX6Q=";
};
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.
···
--replace /opt/mailman/web /var/lib/mailman-web
'';
-
nativeBuildInputs = [ git makeWrapper setuptools-scm ];
+
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ hyperkitty postorius whoosh ];
# Tries to check runtime configuration.
doCheck = false;
-
postInstall = ''
-
wrapProgram $out/bin/mailman-web \
-
--suffix PATH : ${lib.makeBinPath [ sassc ]}
-
'';
+
makeWrapperArgs = [
+
"--suffix PATH : ${lib.makeBinPath [ sassc ]}"
+
];
meta = with lib; {
description = "Django project for Mailman 3 web interface";
+2
pkgs/top-level/python-packages.nix
···
mutf8 = callPackage ../development/python-modules/mutf8 { };
+
mujson = callPackage ../development/python-modules/mujson { };
+
mwclient = callPackage ../development/python-modules/mwclient { };
mwdblib = callPackage ../development/python-modules/mwdblib { };