1{ stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 name = "alsa-lib-1.1.4.1";
5
6 src = fetchurl {
7 urls = [
8 "ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2"
9 "http://alsa.cybermirror.org/lib/${name}.tar.bz2"
10 ];
11 sha256 = "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi";
12 };
13
14 patches = [
15 ./alsa-plugin-conf-multilib.patch
16 ];
17
18 # Fix pcm.h file in order to prevent some compilation bugs
19 # 2: see http://stackoverflow.com/questions/3103400/how-to-overcome-u-int8-t-vs-uint8-t-issue-efficiently
20 postPatch = ''
21 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
22
23
24 sed -i -e '1i#include <stdint.h>' include/pcm.h
25 sed -i -e 's/u_int\([0-9]*\)_t/uint\1_t/g' include/pcm.h
26 '';
27
28 outputs = [ "out" "dev" ];
29
30 meta = with stdenv.lib; {
31 homepage = http://www.alsa-project.org/;
32 description = "ALSA, the Advanced Linux Sound Architecture libraries";
33
34 longDescription = ''
35 The Advanced Linux Sound Architecture (ALSA) provides audio and
36 MIDI functionality to the Linux-based operating system.
37 '';
38
39 license = licenses.gpl3Plus;
40 platforms = platforms.linux;
41 };
42}