1 { stdenv, apulse, libpulseaudio, pkg-config, intltool }:
4 pname = "libpressureaudio";
5 version = apulse.version;
7 src = libpulseaudio.src;
9 nativeBuildInputs = [ pkg-config intltool ];
15 echo "Copying libraries from apulse."
17 ls ${apulse}/lib/apulse $out/lib
18 cp -a ${apulse}/lib/apulse/* $out/lib/
20 echo "Copying headers from pulseaudio."
21 mkdir -p $out/include/pulse
22 cp -a src/pulse/*.h $out/include/pulse
24 echo "Generating custom pkgconfig definitions."
25 mkdir -p $out/lib/pkgconfig
26 for a in libpulse.pc libpulse-simple.pc libpulse-mainloop-glib.pc ; do
27 cat > $out/lib/pkgconfig/$a << EOF
30 includedir=$out/include
35 cat >> $out/lib/pkgconfig/libpulse.pc << EOF
37 Description: PulseAudio Client Interface
38 Version: ${libpulseaudio.version}-rebootstrapped
39 Libs: -L$out/lib -lpulse
40 Cflags: -I$out/include -D_REENTRANT
43 cat >> $out/lib/pkgconfig/libpulse-simple.pc << EOF
45 Description: PulseAudio Simplified Synchronous Client Interface
46 Version: ${libpulseaudio.version}-rebootstrapped
47 Libs: -L$out/lib -lpulse-simple
48 Cflags: -I$out/include -D_REENTRANT
52 cat >> $out/lib/pkgconfig/libpulse-mainloop-glib.pc << EOF
53 Name: libpulse-mainloop-glib
54 Description: PulseAudio GLib 2.0 Main Loop Wrapper
55 Version: ${libpulseaudio.version}-rebootstrapped
56 Libs: -L$out/lib -lpulse-mainloop-glib
57 Cflags: -I$out/include -D_REENTRANT
58 Requires: libpulse glib-2.0
62 meta = apulse.meta // {
63 description = "libpulse without any sound daemons over pure ALSA";
65 apulse (${apulse.meta.homepage}) implements most of libpulse
66 API over pure ALSA in 5% LOC of the original PulseAudio.
68 But apulse is made to be used as a wrapper that substitutes its
69 replacement libs into LD_LIBRARY_PATH. The problem with that is
70 that you still have to link against the original libpulse.
72 pressureaudio (http://git.r-36.net/pressureaudio/) wraps apulse
73 with everything you need to replace libpulse completely.
75 This derivation is a reimplementation of pressureaudio in pure
78 You can simply override libpulse with this and most
79 packages would just work.