Commit 8c81baf3 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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;
          |     ^~~~~~~
parent 885dfe39
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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 = [