15 , withPipewireLib ? true
20 plugin-packages = [ alsa-plugins ] ++ lib.optional withPipewireLib pipewire;
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 {
27 (path: "${path}/lib/alsa-lib")
31 stdenv.mkDerivation rec {
36 url = "mirror://alsa/utils/alsa-utils-${version}.tar.bz2";
37 hash = "sha256-EEti7H8Cp84WynefSBVhbfHMIZM1A3g6kQe1lE+DBjo=";
40 # Backport fixes for musl libc. Remove on next release
42 url = "https://github.com/alsa-project/alsa-utils/commit/8c229270f6bae83b705a03714c46067a7aa57b02.patch";
43 hash = "sha256-sUaBHY8EHf4805nF6tyNV5jYXcJf3O+r04VXFu4dUCE=";
46 url = "https://github.com/alsa-project/alsa-utils/commit/0925ad7f09b2dc77015784f9ac2f5e34dd0dd5c3.patch";
47 hash = "sha256-bgGU9On82AUbOjo+KN6WfuhqUAWM87OHnKN7plpG284=";
51 nativeBuildInputs = [ gettext makeWrapper ];
52 buildInputs = [ alsa-lib ncurses libsamplerate fftw ];
54 configureFlags = [ "--disable-xmlto" "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];
56 installFlags = [ "ASOUND_STATE_DIR=$(TMPDIR)/dummy" ];
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}
65 homepage = "http://www.alsa-project.org/";
66 description = "ALSA, the Advanced Linux Sound Architecture utils";
68 The Advanced Linux Sound Architecture (ALSA) provides audio and
69 MIDI functionality to the Linux-based operating system.
72 license = licenses.gpl2;
73 platforms = platforms.linux;
74 maintainers = [ maintainers.AndersonTorres ];