From 667483b8243d730a2dae726191e2394d2029ee67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=A9clairevoyant?= <848000+eclairevoyant@users.noreply.github.com> Date: Thu, 12 Mar 2026 18:56:09 -0400 Subject: [PATCH] lilypond: fix build with clang21 --- pkgs/by-name/li/lilypond-unstable/package.nix | 2 ++ pkgs/by-name/li/lilypond/package.nix | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/pkgs/by-name/li/lilypond-unstable/package.nix b/pkgs/by-name/li/lilypond-unstable/package.nix index 05ea34a323fa..d0f46eca1787 100644 --- a/pkgs/by-name/li/lilypond-unstable/package.nix +++ b/pkgs/by-name/li/lilypond-unstable/package.nix @@ -14,6 +14,8 @@ lilypond.overrideAttrs ( hash = "sha256-UFuL8TZ7uLZhXgFoMGxAye04dNcvrw1gqQMOnE4P2fc="; }; + patches = [ ]; + passthru.updateScript = writeScript "update-lilypond-unstable" '' #!/usr/bin/env nix-shell #!nix-shell -i bash -p common-updater-scripts curl diff --git a/pkgs/by-name/li/lilypond/package.nix b/pkgs/by-name/li/lilypond/package.nix index e18023db30f5..0fad1654d612 100644 --- a/pkgs/by-name/li/lilypond/package.nix +++ b/pkgs/by-name/li/lilypond/package.nix @@ -41,6 +41,7 @@ ] ), writeScript, + fetchpatch2, }: stdenv.mkDerivation (finalAttrs: { @@ -78,6 +79,18 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "mem=mf2pt1" "mem=$PWD/mf/mf2pt1" ''; + patches = [ + # fixes #475503 + # distilled version of https://gitweb.git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=f2192eb294e + # so, remove once that commit reaches a stable release + (fetchpatch2 { + name = "fix-clang-21-build.patch"; + url = "https://cgit.freebsd.org/ports/plain/print/lilypond/files/patch-lily_include_smobs.hh?id=58bab68c706086774b17dcacc61c8fd37ecc8a15"; + extraPrefix = ""; # adds old/new prefixes to process properly in patchPhase + hash = "sha256-nT8+nYU+m6lLTvHEvSIpG/yAwy1Omb6+4Z+NGwEVE4Q="; + }) + ]; + strictDeps = true; depsBuildBuild = [