From 0322fc27e930887ecadef44cf114c22273f32aa0 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 30 Dec 2025 19:41:10 +0100 Subject: [PATCH] haskellPackages.PortMidi: fix compilation with gcc15 --- .../haskell-modules/configuration-common.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index fa83e22bb9d0..dedbc842ebb3 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1546,7 +1546,16 @@ with haskellLib; # PortMidi needs an environment variable to have ALSA find its plugins: # https://github.com/NixOS/nixpkgs/issues/6860 PortMidi = overrideCabal (drv: { - patches = (drv.patches or [ ]) ++ [ ./patches/portmidi-alsa-plugins.patch ]; + patches = (drv.patches or [ ]) ++ [ + ./patches/portmidi-alsa-plugins.patch + # Fixes compilation with GCC15 which defaults to C23 + # https://github.com/PortMidi/PortMidi-haskell/pull/24 + (pkgs.fetchpatch { + name = "PortMidi-C23.patch"; + url = "https://github.com/PortMidi/PortMidi-haskell/commit/24b6ce1c77137b055ae57a99080d5f1616490197.patch"; + sha256 = "sha256-PqnWA/DMW00Gtfa4YDV6iC/MXwQ3gFsNESbx+daw4C4="; + }) + ]; postPatch = (drv.postPatch or "") + '' substituteInPlace portmidi/pm_linux/pmlinuxalsa.c \ --replace @alsa_plugin_dir@ "${pkgs.alsa-plugins}/lib/alsa-lib"