From f47a088a80b2afce40794ac10d447a941f159d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Mon, 15 Jun 2026 16:01:00 -0700 Subject: [PATCH] python3Packages.mail-parser: 4.1.4 -> 4.4.0 Diff: https://github.com/SpamScope/mail-parser/compare/4.1.4...4.4.0 --- .../python-modules/mail-parser/default.nix | 40 +++++++++---------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/mail-parser/default.nix b/pkgs/development/python-modules/mail-parser/default.nix index c56abff52667..4a9958b594dd 100644 --- a/pkgs/development/python-modules/mail-parser/default.nix +++ b/pkgs/development/python-modules/mail-parser/default.nix @@ -2,58 +2,56 @@ lib, buildPythonPackage, python, - glibcLocales, + extract-msg, fetchFromGitHub, + hatchling, pytest-cov-stub, + pytest-mock, pytestCheckHook, - setuptools, - six, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "mail-parser"; - version = "4.1.4"; + version = "4.4.0"; pyproject = true; src = fetchFromGitHub { owner = "SpamScope"; repo = "mail-parser"; - tag = version; - hash = "sha256-wwLUD/k26utugK/Yx9eXYEdSOvrk0Cy6RkXGDnzZ+fE="; + tag = finalAttrs.version; + hash = "sha256-fuL2cWQSkYQKhG/UVNOp4ch4MrZINizvsPCQUzb3Z9c="; }; - env.LC_ALL = "en_US.utf-8"; + build-system = [ hatchling ]; - nativeBuildInputs = [ glibcLocales ]; - - build-system = [ setuptools ]; - - pythonRemoveDeps = [ "ipaddress" ]; - - dependencies = [ - six - ]; + optional-dependencies = { + outlook = [ extract-msg ]; + }; pythonImportsCheck = [ "mailparser" ]; nativeCheckInputs = [ pytest-cov-stub + pytest-mock pytestCheckHook - ]; + ] + ++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies; - # Taken from .travis.yml + # Taken from .github/workflows/main.yml postCheck = '' ${python.interpreter} -m mailparser -v ${python.interpreter} -m mailparser -h ${python.interpreter} -m mailparser -f tests/mails/mail_malformed_3 -j + ${python.interpreter} -m mailparser -f tests/mails/mail_outlook_1 -j cat tests/mails/mail_malformed_3 | ${python.interpreter} -m mailparser -k -j ''; meta = { + changelog = "https://github.com/SpamScope/mail-parser/releases/tag/${finalAttrs.src.tag}"; description = "Mail parser for python 2 and 3"; - mainProgram = "mailparser"; + mainProgram = "mail-parser"; homepage = "https://github.com/SpamScope/mail-parser"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ psyanticy ]; }; -} +})