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.5.1";
11
12 src = fetchurl {
13 url = "mirror://alsa/lib/${pname}-${version}.tar.bz2";
14 sha256 = "sha256-YoQh2VDOyvI03j+JnVIMCmkjMTyWStdR/6wIHfMxQ44=";
15 };
16
17 patches = [
18 ./alsa-plugin-conf-multilib.patch
19 ];
20
21 enableParallelBuilding = true;
22
23 # Fix pcm.h file in order to prevent some compilation bugs
24 postPatch = ''
25 sed -i -e 's|//int snd_pcm_mixer_element(snd_pcm_t \*pcm, snd_mixer_t \*mixer, snd_mixer_elem_t \*\*elem);|/\*int snd_pcm_mixer_element(snd_pcm_t \*pcm, snd_mixer_t \*mixer, snd_mixer_elem_t \*\*elem);\*/|' include/pcm.h
26 '';
27
28 postInstall = ''
29 ln -s ${alsa-ucm-conf}/share/alsa/{ucm,ucm2} $out/share/alsa
30 ln -s ${alsa-topology-conf}/share/alsa/topology $out/share/alsa
31 '';
32
33 outputs = [ "out" "dev" ];
34
35 meta = with lib; {
36 homepage = "http://www.alsa-project.org/";
37 description = "ALSA, the Advanced Linux Sound Architecture libraries";
38
39 longDescription = ''
40 The Advanced Linux Sound Architecture (ALSA) provides audio and
41 MIDI functionality to the Linux-based operating system.
42 '';
43
44 license = licenses.lgpl21Plus;
45 platforms = platforms.linux;
46 };
47}