nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 93 lines 2.4 kB view raw
1{ 2 lib, 3 fetchpatch, 4 python3, 5 fetchPypi, 6 postfix, 7 lynx, 8 nixosTests, 9}: 10 11with python3.pkgs; 12 13buildPythonPackage rec { 14 pname = "mailman"; 15 version = "3.3.9"; 16 pyproject = true; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-GblXI6IwkLl+V1gEbMAe1baVyZOHMaYaYITXcTkp2Mo="; 21 }; 22 23 build-system = with python3.pkgs; [ 24 setuptools 25 ]; 26 27 dependencies = with python3.pkgs; [ 28 aiosmtpd 29 alembic 30 authheaders 31 click 32 dnspython 33 falcon 34 flufl-bounce 35 flufl-i18n 36 flufl-lock 37 gunicorn 38 lazr-config 39 passlib 40 python-dateutil 41 requests 42 sqlalchemy 43 standard-nntplib 44 zope-component 45 zope-configuration 46 ]; 47 48 checkInputs = [ 49 sphinx 50 ]; 51 52 patches = [ 53 (fetchpatch { 54 url = "https://gitlab.com/mailman/mailman/-/commit/4b206e2a5267a0e17f345fd7b2d957122ba57566.patch"; 55 sha256 = "06axmrn74p81wvcki36c7gfj5fp5q15zxz2yl3lrvijic7hbs4n2"; 56 }) 57 (fetchpatch { 58 url = "https://gitlab.com/mailman/mailman/-/commit/9613154f3c04fa2383fbf017031ef263c291418d.patch"; 59 sha256 = "0vyw87s857vfxbf7kihwb6w094xyxmxbi1bpdqi3ybjamjycp55r"; 60 }) 61 (fetchpatch { 62 name = "python-3.13.patch"; 63 url = "https://gitlab.com/mailman/mailman/-/commit/685d9a7bdbd382d9e8d4a2da74bd973e93356e05.patch"; 64 hash = "sha256-KCXVP+5zqgluUXQCGmMRC+G1hEDnFBlTUETGpmFDOOk="; 65 }) 66 ./log-stderr.patch 67 ]; 68 69 postPatch = '' 70 substituteInPlace src/mailman/config/postfix.cfg \ 71 --replace /usr/sbin/postmap ${postfix}/bin/postmap 72 substituteInPlace src/mailman/config/schema.cfg \ 73 --replace /usr/bin/lynx ${lynx}/bin/lynx 74 ''; 75 76 # Mailman assumes that those scripts in $out/bin are Python scripts. Wrapping 77 # them in shell code breaks this assumption. Use the wrapped version (see 78 # wrapped.nix) if you need the CLI (rather than the Python library). 79 # 80 # This gives a properly wrapped 'mailman' command plus an interpreter that 81 # has all the necessary search paths to execute unwrapped 'master' and 82 # 'runner' scripts. 83 dontWrapPythonPrograms = true; 84 85 passthru.tests = { inherit (nixosTests) mailman; }; 86 87 meta = { 88 homepage = "https://www.gnu.org/software/mailman/"; 89 description = "Free software for managing electronic mail discussion and newsletter lists"; 90 license = lib.licenses.gpl3Plus; 91 maintainers = with lib.maintainers; [ qyliss ]; 92 }; 93}