Merge pull request #142153 from Artturin/mailmanbuildfix
This commit is contained in:
commit
6aded65e28
8 changed files with 83 additions and 47 deletions
|
@ -1,17 +1,28 @@
|
|||
{ 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
|
||||
}:
|
||||
|
||||
|
@ -29,24 +40,31 @@ buildPythonPackage rec {
|
|||
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; {
|
||||
|
|
|
@ -12,14 +12,14 @@
|
|||
|
||||
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
Normal file
32
pkgs/development/python-modules/mujson/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ 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 ];
|
||||
};
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{ 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 {
|
||||
|
@ -14,11 +14,8 @@ let
|
|||
});
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
with py.pkgs;
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mailman";
|
||||
version = "3.3.5";
|
||||
|
@ -29,7 +26,7 @@ buildPythonPackage rec {
|
|||
sha256 = "12mgxs1ndhdjjkydx48b95na9k9h0disfqgrr6wxx7vda6dqvcwz";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
propagatedBuildInputs = with pythonOverride.pkgs; [
|
||||
aiosmtpd
|
||||
alembic
|
||||
authheaders
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitLab
|
||||
, isPy3k
|
||||
, fetchPypi
|
||||
, pythonOlder
|
||||
|
||||
# dependencies
|
||||
, defusedxml
|
||||
|
@ -32,18 +32,12 @@ buildPythonPackage rec {
|
|||
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 = ''
|
||||
|
|
|
@ -6,11 +6,11 @@ buildPythonPackage rec {
|
|||
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 ];
|
||||
|
|
|
@ -1,24 +1,18 @@
|
|||
{ 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.
|
||||
|
@ -32,16 +26,15 @@ buildPythonPackage rec {
|
|||
--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";
|
||||
|
|
|
@ -4978,6 +4978,8 @@ in {
|
|||
|
||||
mutf8 = callPackage ../development/python-modules/mutf8 { };
|
||||
|
||||
mujson = callPackage ../development/python-modules/mujson { };
|
||||
|
||||
mwclient = callPackage ../development/python-modules/mwclient { };
|
||||
|
||||
mwdblib = callPackage ../development/python-modules/mwdblib { };
|
||||
|
|
Loading…
Reference in a new issue