From 666e3267850998efd257c660d67a156c41c8ab10 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Thu, 16 Jan 2025 21:19:32 -0800 Subject: [PATCH] alsa-lib: fix building with llvm --- pkgs/by-name/al/alsa-lib/package.nix | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/al/alsa-lib/package.nix b/pkgs/by-name/al/alsa-lib/package.nix index 21234c648375..f21d216a63bb 100644 --- a/pkgs/by-name/al/alsa-lib/package.nix +++ b/pkgs/by-name/al/alsa-lib/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, alsa-topology-conf, alsa-ucm-conf, testers, @@ -16,13 +17,24 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-jE/zdVPL6JYY4Yfkx3n3GpuyqLJ7kfh+1AmHzJIz2PY="; }; - patches = [ - # Add a "libs" field to the syntax recognized in the /etc/asound.conf file. - # The nixos modules for pulseaudio, jack, and pipewire are leveraging this - # "libs" field to declare locations for both native and 32bit plugins, in - # order to support apps with 32bit sound running on x86_64 architecture. - ./alsa-plugin-conf-multilib.patch - ]; + patches = + [ + # Add a "libs" field to the syntax recognized in the /etc/asound.conf file. + # The nixos modules for pulseaudio, jack, and pipewire are leveraging this + # "libs" field to declare locations for both native and 32bit plugins, in + # order to support apps with 32bit sound running on x86_64 architecture. + ./alsa-plugin-conf-multilib.patch + ] + ++ lib.optional (stdenv.hostPlatform.useLLVM or false) + # Fixes version script under LLVM, should be fixed in the next update. + # Check if "pkgsLLVM.alsa-lib" builds on next version bump and remove this + # if it succeeds. + ( + fetchurl { + url = "https://github.com/alsa-project/alsa-lib/commit/76edab4e595bd5f3f4c636cccc8d7976d3c519d6.patch"; + hash = "sha256-WCOXfe0/PPZRMXdNa29Jn28S2r0PQ7iTsabsxZVSwnk="; + } + ); enableParallelBuilding = true;