From 1f9a42d62f700bb9e9e463728fac34e2295b2638 Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Thu, 19 Feb 2026 23:29:52 +0100 Subject: [PATCH] python314Packages.nose2: fix build Starting with Python 3.14, both `-X` and `--xxx` are surrounded by ANSI color codes in the argparse help text. https://github.com/nose-devs/nose2/pull/648 --- pkgs/development/python-modules/nose2/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/nose2/default.nix b/pkgs/development/python-modules/nose2/default.nix index 3ca80388a236..d63097f20a76 100644 --- a/pkgs/development/python-modules/nose2/default.nix +++ b/pkgs/development/python-modules/nose2/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchPypi, + fetchpatch, # build-system setuptools, @@ -23,6 +24,15 @@ buildPythonPackage rec { hash = "sha256-NncPUZ31vs08v+C+5Ku/v5ufa0604DNh0oK378/E8N8="; }; + patches = [ + # Starting with Python 3.14, both `-X` and `--xxx` are surrounded + # by ANSI color codes in the argparse help text. + (fetchpatch { + url = "https://github.com/nose-devs/nose2/commit/2043fdfa264dc04e379e11c227e63a5704cb0185.patch"; + hash = "sha256-OWzBInMI0ef9g0H3muka7J7FP01IZEFkuzJfaku78bI="; + }) + ]; + build-system = [ setuptools ]; optional-dependencies = {