summaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorArtturi <Artturin@artturin.com>2021-11-21 01:35:38 +0200
committerGitHub <noreply@github.com>2021-11-21 01:35:38 +0200
commit6aded65e28c8805bfb81e6b5fc1613633480eb16 (patch)
tree8a27b72c12b8d5a3a2f0940f8040a472e8398bd6 /pkgs
parent7907b7682c3db68b5b4bf13d16962d2f4088bb92 (diff)
parenta997abfb2843fee283c0976c69ad93a0af509787 (diff)
Merge pull request #142153 from Artturin/mailmanbuildfix
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/falcon/default.nix30
-rw-r--r--pkgs/development/python-modules/mailman-hyperkitty/default.nix4
-rw-r--r--pkgs/development/python-modules/mujson/default.nix32
-rw-r--r--pkgs/servers/mail/mailman/default.nix11
-rw-r--r--pkgs/servers/mail/mailman/hyperkitty.nix18
-rw-r--r--pkgs/servers/mail/mailman/postorius.nix4
-rw-r--r--pkgs/servers/mail/mailman/web.nix31
-rw-r--r--pkgs/top-level/python-packages.nix2
8 files changed, 84 insertions, 48 deletions
diff --git a/pkgs/development/python-modules/falcon/default.nix b/pkgs/development/python-modules/falcon/default.nix
index a42da353fc68..5dba22d83912 100644
--- a/pkgs/development/python-modules/falcon/default.nix
+++ b/pkgs/development/python-modules/falcon/default.nix
@@ -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; {
diff --git a/pkgs/development/python-modules/mailman-hyperkitty/default.nix b/pkgs/development/python-modules/mailman-hyperkitty/default.nix
index 649d8d4cf3df..117ec4fb4361 100644
--- a/pkgs/development/python-modules/mailman-hyperkitty/default.nix
+++ b/pkgs/development/python-modules/mailman-hyperkitty/default.nix
@@ -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 = [
diff --git a/pkgs/development/python-modules/mujson/default.nix b/pkgs/development/python-modules/mujson/default.nix
new file mode 100644
index 000000000000..10f0e40b7626
--- /dev/null
+++ b/pkgs/development/python-modules/mujson/default.nix
@@ -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 ];
+ };
+}
diff --git a/pkgs/servers/mail/mailman/default.nix b/pkgs/servers/mail/mailman/default.nix
index 557a9d54c149..8cd087f4174f 100644
--- a/pkgs/servers/mail/mailman/default.nix
+++ b/pkgs/servers/mail/mailman/default.nix
@@ -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
diff --git a/pkgs/servers/mail/mailman/hyperkitty.nix b/pkgs/servers/mail/mailman/hyperkitty.nix
index d0d7cbc7fbb6..4d4f714e7487 100644
--- a/pkgs/servers/mail/mailman/hyperkitty.nix
+++ b/pkgs/servers/mail/mailman/hyperkitty.nix
@@ -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 = ''
diff --git a/pkgs/servers/mail/mailman/postorius.nix b/pkgs/servers/mail/mailman/postorius.nix
index 57df52d0a0a6..4022b6fe91c9 100644
--- a/pkgs/servers/mail/mailman/postorius.nix
+++ b/pkgs/servers/mail/mailman/postorius.nix
@@ -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 ];
diff --git a/pkgs/servers/mail/mailman/web.nix b/pkgs/servers/mail/mailman/web.nix
index 10adb49be84f..c517cb3e4e30 100644
--- a/pkgs/servers/mail/mailman/web.nix
+++ b/pkgs/servers/mail/mailman/web.nix
@@ -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;
-
- src = fetchgit {
- url = "https://gitlab.com/mailman/mailman-web";
- rev = "19a7abe27dd3bc39c0250440de073f0adecd4da1";
- sha256 = "0h25140n2jaisl0ri5x7gdmbypiys8vlq8dql1zmaxvq459ybxkn";
- leaveDotGit = true;
+ version = "0.0.5";
+ disabled = pythonOlder "3.8";
+
+ 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";
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 9798dbfd55ba..eb9e8bf2ec5c 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -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 { };