From b88d29cf6d4245a397e9a4abdfc1aba417143ba1 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 27 Dec 2025 15:28:37 +0800 Subject: [PATCH 1/7] python3Packages.tpm2-pytss: fix build with gcc 15 --- pkgs/development/python-modules/tpm2-pytss/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/tpm2-pytss/default.nix b/pkgs/development/python-modules/tpm2-pytss/default.nix index d04f2c2b46ea..2c9e1c759c67 100644 --- a/pkgs/development/python-modules/tpm2-pytss/default.nix +++ b/pkgs/development/python-modules/tpm2-pytss/default.nix @@ -54,6 +54,16 @@ buildPythonPackage rec { url = "https://github.com/tpm2-software/tpm2-pytss/commit/afdee627d0639eb05711a2191f2f76e460793da9.patch?full_index=1"; hash = "sha256-Y6drcBg4gnbSvnCGw69b42Q/QfLI3u56BGRUEkpdB0M="; }) + # Fix build with gcc15 by using c99 for preprocessing + # The first patch is needed to apply the second; it doesn't affect us + (fetchpatch { + url = "https://github.com/tpm2-software/tpm2-pytss/commit/55d28b259f1a68f60c937ea8be7815685d32757f.patch"; + hash = "sha256-sGxUyQ2W2Jl9ROSt1w0E0dVTgFPAmYWlNgcpHcTVv90="; + }) + (fetchpatch { + url = "https://github.com/tpm2-software/tpm2-pytss/commit/61d00b4dcca131b3f03f674ceabf4260bdbd6a61.patch"; + hash = "sha256-0dwfyW0Fi5FkzYnaMOb2ua9O6eyCnMgJqT09tTT56vY="; + }) ] ++ lib.optionals isCross [ # pytss will regenerate files from headers of tpm2-tss. From d742718dd4487e33c2ba8114b37bdf1cd43a3576 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 27 Dec 2025 22:55:55 +0800 Subject: [PATCH 2/7] openttd: fix build with gcc 15 --- pkgs/games/openttd/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/games/openttd/default.nix b/pkgs/games/openttd/default.nix index e260175e7af8..f690f2a09ceb 100644 --- a/pkgs/games/openttd/default.nix +++ b/pkgs/games/openttd/default.nix @@ -82,6 +82,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/OpenTTD/OpenTTD/commit/14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e.patch"; hash = "sha256-L35ybnTKPO+HVP/7ZYzWM2mA+s1RAywhofSuzpy/6sc="; }) + + (fetchpatch { + name = "fix-GCC-15-due-to-missing-CRTP-usage.patch"; + url = "https://github.com/OpenTTD/OpenTTD/commit/db36e61807955c896267d6585de0577efd30465d.patch"; + hash = "sha256-wJqboBuB+gcn1UPoTlym9IaL7tXtdKEp/E474vG5rYk="; + }) ]; nativeBuildInputs = [ From e528c0e7e4fbe95e5fc1ede79fe7236da7ba2e9b Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 27 Dec 2025 23:25:26 +0800 Subject: [PATCH 3/7] nvi: sync debian patch to fix gcc 15 build --- pkgs/by-name/nv/nvi/debian-patches.nix | 6 +++++- pkgs/by-name/nv/nvi/debian-patches.txt | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/nv/nvi/debian-patches.nix b/pkgs/by-name/nv/nvi/debian-patches.nix index be60d0939eb2..87559570cee4 100644 --- a/pkgs/by-name/nv/nvi/debian-patches.nix +++ b/pkgs/by-name/nv/nvi/debian-patches.nix @@ -1,6 +1,6 @@ # Generated by debian-patches.sh from debian-patches.txt let - prefix = "https://sources.debian.org/data/main/n/nvi/1.81.6-23/debian/patches"; + prefix = "https://sources.debian.org/data/main/n/nvi/1.81.6-24/debian/patches"; in [ { @@ -167,4 +167,8 @@ in url = "${prefix}/0041-Fix-FTBFS-because-of-incompatible-pointer-type-error.patch"; sha256 = "1qvzrxfbk3ylr6cc3y94rlgfbdj2z14dhh6m09drkxb4bqcp2awv"; } + { + url = "${prefix}/0042-Fix-ftbfs-with-GCC-15.patch"; + sha256 = "13v5ydsnmbfqww2j8v13r83iz9zkk2z5wd9qccz7sb5wzm32zs59"; + } ] diff --git a/pkgs/by-name/nv/nvi/debian-patches.txt b/pkgs/by-name/nv/nvi/debian-patches.txt index 32e7b4a8448b..21089f6984fe 100644 --- a/pkgs/by-name/nv/nvi/debian-patches.txt +++ b/pkgs/by-name/nv/nvi/debian-patches.txt @@ -1,4 +1,4 @@ -nvi/1.81.6-23 +nvi/1.81.6-24 01additional_upstream_data.patch 03db4.patch 04confdefs.patch @@ -40,3 +40,4 @@ upstream/0038-Fix-A-word-search-for-keywords-starting-with-a-non-w.patch 0039-Add-function-prototypes-to-fix-implicit-function-dec.patch 0040-Add-more-function-prototypes-to-fix-Wimplicit-functi.patch 0041-Fix-FTBFS-because-of-incompatible-pointer-type-error.patch +0042-Fix-ftbfs-with-GCC-15.patch From 57ea42dc474d0f90c02f78e5676c70e9bf6e58fd Mon Sep 17 00:00:00 2001 From: aleksana Date: Sun, 28 Dec 2025 00:42:10 +0800 Subject: [PATCH 4/7] sleuthkit: fix build with gcc 15 --- pkgs/by-name/sl/sleuthkit/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/sl/sleuthkit/package.nix b/pkgs/by-name/sl/sleuthkit/package.nix index 2241c3c18c69..d91930eaa07f 100644 --- a/pkgs/by-name/sl/sleuthkit/package.nix +++ b/pkgs/by-name/sl/sleuthkit/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, autoreconfHook, ant, jdk, @@ -75,6 +76,18 @@ stdenv.mkDerivation (finalAttrs: { chmod -R 755 $IVY_HOME ''; + patches = [ + # Fix build with gcc 15 + (fetchpatch { + url = "https://github.com/sleuthkit/sleuthkit/commit/8d710c36a947a2666bbef689155831d76fff56b9.patch"; + hash = "sha256-/mCal0EVTM2dM5ok3OmAXQ1HiaCUi0lmhavIuwxVEMA="; + }) + (fetchpatch { + url = "https://github.com/sleuthkit/sleuthkit/commit/f78bd37db6be72f8f4d444d124be4e26488dce4b.patch"; + hash = "sha256-ZEeN0jp5cRi6dOpWlcGYm0nLLu5b56ivdR+WrhnhCz0="; + }) + ]; + postPatch = '' substituteInPlace tsk/img/ewf.cpp --replace libewf_handle_read_random libewf_handle_read_buffer_at_offset ''; From 6bd815ae5f023c282f39d9f5b8a9bbe191a98600 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 28 Dec 2025 10:00:06 +0100 Subject: [PATCH 5/7] python314Packages.dataclasses-json: fix compat --- .../dataclasses-json/default.nix | 2 + .../dataclasses-json/python-3.14-compat.patch | 145 ++++++++++++++++++ 2 files changed, 147 insertions(+) create mode 100644 pkgs/development/python-modules/dataclasses-json/python-3.14-compat.patch diff --git a/pkgs/development/python-modules/dataclasses-json/default.nix b/pkgs/development/python-modules/dataclasses-json/default.nix index 2b37e552e67c..d5bb8918d91f 100644 --- a/pkgs/development/python-modules/dataclasses-json/default.nix +++ b/pkgs/development/python-modules/dataclasses-json/default.nix @@ -27,6 +27,8 @@ buildPythonPackage rec { patches = [ ./marshmallow-4.0-compat.patch + # https://github.com/lidatong/dataclasses-json/pull/565 + ./python-3.14-compat.patch ]; postPatch = '' diff --git a/pkgs/development/python-modules/dataclasses-json/python-3.14-compat.patch b/pkgs/development/python-modules/dataclasses-json/python-3.14-compat.patch new file mode 100644 index 000000000000..e09a5d91b4d5 --- /dev/null +++ b/pkgs/development/python-modules/dataclasses-json/python-3.14-compat.patch @@ -0,0 +1,145 @@ +From 20799887ff1d50dc6ca5d90bc1038ff5160b97f3 Mon Sep 17 00:00:00 2001 +From: "paul@iqmo.com" +Date: Tue, 19 Aug 2025 21:38:21 -0400 +Subject: [PATCH 3/8] fix 3.14 / PEP649, but maintain bw compat + +--- + dataclasses_json/core.py | 40 +++++++++++++++++++++++++++++- + dataclasses_json/undefined.py | 3 ++- + tests/test_undefined_parameters.py | 36 +++++++++++++++++++++++++++ + 3 files changed, 77 insertions(+), 2 deletions(-) + +diff --git a/dataclasses_json/core.py b/dataclasses_json/core.py +index 69f51a3a..313e2615 100644 +--- a/dataclasses_json/core.py ++++ b/dataclasses_json/core.py +@@ -18,6 +18,7 @@ + from uuid import UUID + + from typing_inspect import is_union_type # type: ignore ++import typing + + from dataclasses_json import cfg + from dataclasses_json.utils import (_get_type_cons, _get_type_origin, +@@ -44,6 +45,43 @@ + Set: frozenset, + }) + ++PEP649 = sys.version_info >= (3, 14) ++ ++if PEP649: ++ import inspect ++ ++def _safe_get_type_hints(c, **kwargs): ++ ++ if not PEP649: ++ # not running under PEP 649 (future/deferred annotations), ++ return typing.get_type_hints(c, include_extras=True, **kwargs) ++ ++ else: ++ if not isinstance(c, type): ++ # If we're passed an instance instead of a class, normalize to its type ++ c = c.__class__ ++ if "." not in getattr(c, "__qualname__", ""): ++ # If this is a *top-level class* (no "." in __qualname__), ++ # typing.get_type_hints works fine even under PEP 649. ++ return typing.get_type_hints(c, include_extras=True, **kwargs) ++ else: ++ # Otherwise, this is a *nested class* (defined inside another class or function), ++ # where typing.get_type_hints may fail under PEP 649. ++ ann = {} ++ ++ # First collect annotations from bases in the MRO ++ for base in reversed(c.__mro__[:-1]): ++ ann.update(inspect.get_annotations(base, format=inspect.Format.VALUE) or {}) ++ ++ # For the class itself, use FORWARDREF format to keep "Self"/recursive types intact ++ ann.update(inspect.get_annotations(c, format=inspect.Format.FORWARDREF) or {}) ++ ++ if ann: ++ return ann ++ else: ++ return {f.name: f.type for f in fields(c)} ++ ++ + + class _ExtendedEncoder(json.JSONEncoder): + def default(self, o) -> Json: +@@ -175,7 +213,7 @@ def _decode_dataclass(cls, kvs, infer_missing): + kvs = _handle_undefined_parameters_safe(cls, kvs, usage="from") + + init_kwargs = {} +- types = get_type_hints(cls) ++ types = _safe_get_type_hints(cls) + for field in fields(cls): + # The field should be skipped from being added + # to init_kwargs as it's not intended as a constructor argument. +diff --git a/dataclasses_json/undefined.py b/dataclasses_json/undefined.py +index cb8b2cfc..a94b4718 100644 +--- a/dataclasses_json/undefined.py ++++ b/dataclasses_json/undefined.py +@@ -7,6 +7,7 @@ + from typing import Any, Callable, Dict, Optional, Tuple, Union, Type, get_type_hints + from enum import Enum + ++from .core import _safe_get_type_hints + from marshmallow.exceptions import ValidationError # type: ignore + + from dataclasses_json.utils import CatchAllVar +@@ -248,7 +249,7 @@ def _catch_all_init(self, *args, **kwargs): + @staticmethod + def _get_catch_all_field(cls) -> Field: + cls_globals = vars(sys.modules[cls.__module__]) +- types = get_type_hints(cls, globalns=cls_globals) ++ types = _safe_get_type_hints(cls, globalns=cls_globals) + catch_all_fields = list( + filter(lambda f: types[f.name] == Optional[CatchAllVar], fields(cls))) + number_of_catch_all_fields = len(catch_all_fields) +diff --git a/tests/test_undefined_parameters.py b/tests/test_undefined_parameters.py +index bac711af..6bd33406 100644 +--- a/tests/test_undefined_parameters.py ++++ b/tests/test_undefined_parameters.py +@@ -221,6 +221,42 @@ class Boss: + assert json.loads(boss_json) == Boss.schema().dump(boss) + assert "".join(boss_json.replace('\n', '').split()) == "".join(Boss.schema().dumps(boss).replace('\n', '').split()) + ++@dataclass_json(undefined=Undefined.INCLUDE) ++@dataclass(frozen=True) ++class Minion2: ++ name: str ++ catch_all: CatchAll ++ ++@dataclass_json(undefined=Undefined.INCLUDE) ++@dataclass(frozen=True) ++class Boss2: ++ minions: List[Minion2] ++ catch_all: CatchAll ++ ++def test_undefined_parameters_catch_all_schema_roundtrip2(boss_json): ++ boss1 = Boss2.schema().loads(boss_json) ++ dumped_s = Boss2.schema().dumps(boss1) ++ boss2 = Boss2.schema().loads(dumped_s) ++ assert boss1 == boss2 ++ ++ ++def test_undefined_parameters_catch_all_schema_roundtrip(boss_json): ++ @dataclass_json(undefined=Undefined.INCLUDE) ++ @dataclass(frozen=True) ++ class Minion: ++ name: str ++ catch_all: CatchAll ++ ++ @dataclass_json(undefined=Undefined.INCLUDE) ++ @dataclass(frozen=True) ++ class Boss: ++ minions: List[Minion] ++ catch_all: CatchAll ++ ++ boss1 = Boss.schema().loads(boss_json) ++ dumped_s = Boss.schema().dumps(boss1) ++ boss2 = Boss.schema().loads(dumped_s) ++ assert boss1 == boss2 + + def test_undefined_parameters_catch_all_schema_roundtrip(boss_json): + @dataclass_json(undefined=Undefined.INCLUDE) + From dfc3536d74845d65e5a903adc1f8ee0e58d0c1de Mon Sep 17 00:00:00 2001 From: Kirill Radzikhovskyy Date: Sun, 28 Dec 2025 19:51:32 +1100 Subject: [PATCH 6/7] aseprite, skia-aseprite: fix build with GCC 15 --- pkgs/by-name/as/aseprite/package.nix | 5 +++++ pkgs/by-name/sk/skia-aseprite/package.nix | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/pkgs/by-name/as/aseprite/package.nix b/pkgs/by-name/as/aseprite/package.nix index 5897f83913cb..87b8b27b3b11 100644 --- a/pkgs/by-name/as/aseprite/package.nix +++ b/pkgs/by-name/as/aseprite/package.nix @@ -105,6 +105,11 @@ clangStdenv.mkDerivation (finalAttrs: { postPatch = '' substituteInPlace src/ver/CMakeLists.txt \ --replace-fail '"1.x-dev"' '"${finalAttrs.version}"' + + # Using substituteInPlace because no upstream patch for GCC 15 was found for this bundled library. + substituteInPlace third_party/json11/json11.cpp \ + --replace-fail "#include " "#include + #include " ''; cmakeFlags = [ diff --git a/pkgs/by-name/sk/skia-aseprite/package.nix b/pkgs/by-name/sk/skia-aseprite/package.nix index 446556a126b8..c2de5cece603 100644 --- a/pkgs/by-name/sk/skia-aseprite/package.nix +++ b/pkgs/by-name/sk/skia-aseprite/package.nix @@ -41,6 +41,16 @@ clangStdenv.mkDerivation (finalAttrs: { python3 ]; + # Using substituteInPlace because no clean upstream backport for GCC 15 exists for this version of Skia, newer versions fix this with large refactorings. + postPatch = '' + substituteInPlace include/private/SkSLProgramKind.h \ + --replace-fail "#include " "#include + #include " + substituteInPlace src/sksl/transform/SkSLTransform.h \ + --replace-fail "#include " "#include + #include " + ''; + preConfigure = with depSrcs; '' mkdir -p third_party/externals ln -s ${angle2} third_party/externals/angle2 From 8a5a3e116f333eace2d3f5aa95b7ece338f58783 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 28 Dec 2025 10:33:53 +0100 Subject: [PATCH 7/7] python314Packages.uvloop: skip failing test on aarch64-darwin This is guarded to save rebuilds and could be generalized later. --- pkgs/development/python-modules/uvloop/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/uvloop/default.nix b/pkgs/development/python-modules/uvloop/default.nix index ed4c643c2245..06de4afd62f9 100644 --- a/pkgs/development/python-modules/uvloop/default.nix +++ b/pkgs/development/python-modules/uvloop/default.nix @@ -2,9 +2,9 @@ lib, stdenv, buildPythonPackage, + pythonAtLeast, pythonOlder, fetchFromGitHub, - fetchpatch, # build-system cython, @@ -79,7 +79,14 @@ buildPythonPackage rec { "tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename" # Broken: https://github.com/NixOS/nixpkgs/issues/160904 "tests/test_context.py::Test_UV_Context::test_create_ssl_server_manual_connection_lost" - ]; + ] + ++ + lib.optionals + (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 && pythonAtLeast "3.14") + [ + # https://github.com/MagicStack/uvloop/issues/709 + "tests/test_process.py::TestAsyncio_AIO_Process::test_cancel_post_init" + ]; preCheck = '' # force using installed/compiled uvloop