From f4cce2be074abc8631eae6de17f72cbeb5bd67c8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 6 Aug 2025 04:22:32 +0200 Subject: [PATCH] python3Packages.black: fix click 8.2 compat --- .../python-modules/black/default.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index 2dbdeb9906af..70fac527e59e 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -3,6 +3,7 @@ lib, buildPythonPackage, fetchPypi, + fetchpatch, pythonOlder, pytestCheckHook, aiohttp, @@ -35,6 +36,24 @@ buildPythonPackage rec { hash = "sha256-M0ltXNEiKtczkTUrSujaFSU8Xeibk6gLPiyNmhnsJmY="; }; + patches = [ + (fetchpatch { + name = "click-8.2-compat-1.patch"; + url = "https://github.com/psf/black/commit/14e1de805a5d66744a08742cad32d1660bf7617a.patch"; + hash = "sha256-fHRlMetE6+09MKkuFNQQr39nIKeNrqwQuBNqfIlP4hc="; + }) + (fetchpatch { + name = "click-8.2-compat-2.patch"; + url = "https://github.com/psf/black/commit/ed64d89faa7c738c4ba0006710f7e387174478af.patch"; + hash = "sha256-df/J6wiRqtnHk3mAY3ETiRR2G4hWY1rmZMfm2rjP2ZQ="; + }) + (fetchpatch { + name = "click-8.2-compat-3.patch"; + url = "https://github.com/psf/black/commit/b0f36f5b4233ef4cf613daca0adc3896d5424159.patch"; + hash = "sha256-SGLCxbgrWnAi79IjQOb2H8mD/JDbr2SGfnKyzQsJrOA="; + }) + ]; + nativeBuildInputs = [ hatch-fancy-pypi-readme hatch-vcs