From b88d29cf6d4245a397e9a4abdfc1aba417143ba1 Mon Sep 17 00:00:00 2001 From: aleksana Date: Sat, 27 Dec 2025 15:28:37 +0800 Subject: [PATCH] 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.