From 8c81baf3f0fb4adea142edb5cacc63893120901f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Tue, 27 Jan 2026 21:57:15 +0000 Subject: [PATCH] pioasm: fix `gcc-15` build Without the change the build fails on `master as https://hydra.nixos.org/build/320008755: /build/source/tools/pioasm/pio_types.h:290:5: error: 'uint8_t' does not name a type 290 | uint8_t used_gpio_ranges = 0; | ^~~~~~~ --- pkgs/by-name/pi/pioasm/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/pi/pioasm/package.nix b/pkgs/by-name/pi/pioasm/package.nix index b2f1fc751711..c37ca3dba5a9 100644 --- a/pkgs/by-name/pi/pioasm/package.nix +++ b/pkgs/by-name/pi/pioasm/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchFromGitHub, + fetchpatch, cmake, ninja, }: @@ -16,6 +17,18 @@ stdenv.mkDerivation (finalAttrs: { rev = finalAttrs.version; hash = "sha256-epO7yw6/21/ess3vMCkXvXEqAn6/4613zmH/hbaBbUw="; }; + + patches = [ + # Pull upstream fix for gcc-15: + # https://github.com/raspberrypi/pico-sdk/pull/2468 + (fetchpatch { + name = "gcc-15.patch"; + url = "https://github.com/raspberrypi/pico-sdk/commit/66540fe88e86a9f324422b7451a3b5dff4c0449f.patch"; + hash = "sha256-KwTED7/IWorgRTw1XMU2ILJhf6DAioGuVIunlC1QdNE="; + stripLen = 2; + }) + ]; + sourceRoot = "${finalAttrs.src.name}/tools/pioasm"; nativeBuildInputs = [