1{ lib
2, stdenv
3, fetchurl
4, alsa-topology-conf
5, alsa-ucm-conf
6}:
7
8stdenv.mkDerivation rec {
9 pname = "alsa-lib";
10 version = "1.2.7.2";
11
12 src = fetchurl {
13 url = "mirror://alsa/lib/${pname}-${version}.tar.bz2";
14 hash = "sha256-ijW3IY5Q8qLHk0LQ3pje2BQ5zhnhKAk4Xsm+lZbefC8=";
15 };
16
17 patches = [
18 # Add a "libs" field to the syntax recognized in the /etc/asound.conf file.
19 # The nixos modules for pulseaudio, jack, and pipewire are leveraging this
20 # "libs" field to declare locations for both native and 32bit plugins, in
21 # order to support apps with 32bit sound running on x86_64 architecture.
22 ./alsa-plugin-conf-multilib.patch
23 ];
24
25 enableParallelBuilding = true;
26
27 postInstall = ''
28 ln -s ${alsa-ucm-conf}/share/alsa/{ucm,ucm2} $out/share/alsa
29 ln -s ${alsa-topology-conf}/share/alsa/topology $out/share/alsa
30 '';
31
32 outputs = [ "out" "dev" ];
33
34 meta = with lib; {
35 homepage = "http://www.alsa-project.org/";
36 description = "ALSA, the Advanced Linux Sound Architecture libraries";
37
38 longDescription = ''
39 The Advanced Linux Sound Architecture (ALSA) provides audio and
40 MIDI functionality to the Linux-based operating system.
41 '';
42
43 license = licenses.lgpl21Plus;
44 platforms = platforms.linux;
45 maintainers = with maintainers; [ l-as ];
46 };
47}