From 36c15164ab5ac933ac4a1bea61a4073fb330489d Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 24 Jan 2024 22:19:47 +0000 Subject: [PATCH] string-machine: fix build against `gcc-13` Without the change the build fails as https://hydra.nixos.org/build/246390341: sources/ui/Color.h:4:5: error: 'uint8_t' does not name a type 4 | uint8_t r, g, b, a; | ^~~~~~~ sources/ui/Color.h:1:1: note: 'uint8_t' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | #pragma once --- pkgs/applications/audio/string-machine/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/string-machine/default.nix b/pkgs/applications/audio/string-machine/default.nix index 312cf1db5bac..d679202343d5 100644 --- a/pkgs/applications/audio/string-machine/default.nix +++ b/pkgs/applications/audio/string-machine/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub, boost, cairo, libGL, lv2, pkg-config }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, boost, cairo, libGL, lv2, pkg-config }: stdenv.mkDerivation rec { pname = "string-machine"; @@ -12,6 +12,16 @@ stdenv.mkDerivation rec { fetchSubmodules = true; }; + patches = [ + # gcc-13 compatibility fix: + # https://github.com/jpcima/string-machine/pull/36 + (fetchpatch { + name = "gcc-13.patch"; + url = "https://github.com/jpcima/string-machine/commit/e1f9c70da46e43beb2654b509bc824be5601a0a5.patch"; + hash = "sha256-eS28wBuFjbx2tEb9gtVRZXfK0w2o1RCFTouNf8Adq+k="; + }) + ]; + postPatch = '' patchShebangs ./dpf/utils/generate-ttl.sh '';