3 , directoryListingUpdater
16 , withPipewireLib ? true
21 plugin-packages = [ alsa-plugins ] ++ lib.optional withPipewireLib pipewire;
23 # Create a directory containing symlinks of all ALSA plugins.
24 # This is necessary because ALSA_PLUGIN_DIR must reference only one directory.
25 plugin-dir = symlinkJoin {
28 (path: "${path}/lib/alsa-lib")
32 stdenv.mkDerivation rec {
37 url = "mirror://alsa/utils/alsa-utils-${version}.tar.bz2";
38 hash = "sha256-mLxmd9DAB0AGZ5BRgiMkoKsIea6lWKj2i1EXgNMM2SQ=";
41 nativeBuildInputs = [ gettext makeWrapper ];
42 buildInputs = [ alsa-lib ncurses libsamplerate fftw ];
44 configureFlags = [ "--disable-xmlto" "--with-udev-rules-dir=$(out)/lib/udev/rules.d" ];
46 installFlags = [ "ASOUND_STATE_DIR=$(TMPDIR)/dummy" ];
49 mv $out/bin/alsa-info.sh $out/bin/alsa-info
50 wrapProgram $out/bin/alsa-info --prefix PATH : "${lib.makeBinPath [ which pciutils procps ]}"
51 wrapProgram $out/bin/aplay --set-default ALSA_PLUGIN_DIR ${plugin-dir}
54 passthru.updateScript = directoryListingUpdater {
55 url = "https://www.alsa-project.org/files/pub/utils/";
59 homepage = "http://www.alsa-project.org/";
60 description = "ALSA, the Advanced Linux Sound Architecture utils";
62 The Advanced Linux Sound Architecture (ALSA) provides audio and
63 MIDI functionality to the Linux-based operating system.
66 license = licenses.gpl2;
67 platforms = platforms.linux;