alsa-utils: make `aplay` find pipewire's ALSA library

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

authored by Damien Cassou Sandro and committed by Anderson Torres 48068224 f6e4992c

+30 -1
+30 -1
pkgs/by-name/al/alsa-utils/package.nix
··· 1 - {lib, stdenv, fetchurl, fetchpatch, alsa-lib, gettext, makeWrapper, ncurses, libsamplerate, pciutils, which, fftw}: 2 3 stdenv.mkDerivation rec { 4 pname = "alsa-utils"; 5 version = "1.2.10"; ··· 30 postFixup = '' 31 mv $out/bin/alsa-info.sh $out/bin/alsa-info 32 wrapProgram $out/bin/alsa-info --prefix PATH : "${lib.makeBinPath [ which pciutils ]}" 33 ''; 34 35 meta = with lib; {
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , fetchpatch 5 + , alsa-lib 6 + , alsa-plugins 7 + , gettext 8 + , makeWrapper 9 + , ncurses 10 + , libsamplerate 11 + , pciutils 12 + , which 13 + , fftw 14 + , pipewire 15 + , withPipewireLib ? true 16 + , symlinkJoin 17 + }: 18 + 19 + let 20 + plugin-packages = [ alsa-plugins ] ++ lib.optional withPipewireLib pipewire.lib; 21 22 + # Create a directory containing symlinks of all ALSA plugins. 23 + # This is necessary because ALSA_PLUGIN_DIR must reference only one directory. 24 + plugin-dir = symlinkJoin { 25 + name = "all-plugins"; 26 + paths = map 27 + (path: "${path}/lib/alsa-lib") 28 + plugin-packages; 29 + }; 30 + in 31 stdenv.mkDerivation rec { 32 pname = "alsa-utils"; 33 version = "1.2.10"; ··· 58 postFixup = '' 59 mv $out/bin/alsa-info.sh $out/bin/alsa-info 60 wrapProgram $out/bin/alsa-info --prefix PATH : "${lib.makeBinPath [ which pciutils ]}" 61 + wrapProgram $out/bin/aplay --set-default ALSA_PLUGIN_DIR ${plugin-dir} 62 ''; 63 64 meta = with lib; {