2010-07-31 14:05:58 +01:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi
|
2011-11-07 17:51:04 +00:00
|
|
|
, gconf, gtk, intltool, gettext
|
2013-06-20 21:48:35 +01:00
|
|
|
, alsaLib, libsamplerate, libsndfile, speex, bluez, sbc, udev, libcap
|
2011-11-06 20:03:07 +00:00
|
|
|
, jackaudioSupport ? false, jackaudio ? null
|
2011-11-07 17:51:04 +00:00
|
|
|
, x11Support ? false, xlibs
|
2012-01-18 20:53:01 +00:00
|
|
|
, json_c
|
2012-10-26 17:24:48 +01:00
|
|
|
, useSystemd ? false, systemd ? null
|
2011-11-06 20:03:07 +00:00
|
|
|
}:
|
2008-12-19 14:56:37 +00:00
|
|
|
|
2011-07-30 19:51:42 +01:00
|
|
|
assert jackaudioSupport -> jackaudio != null;
|
2008-12-19 14:56:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2013-06-20 21:48:35 +01:00
|
|
|
name = "pulseaudio-4.0";
|
2008-12-19 14:56:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2013-06-20 21:48:35 +01:00
|
|
|
url = "http://freedesktop.org/software/pulseaudio/releases/pulseaudio-4.0.tar.xz";
|
|
|
|
sha256 = "1bndz4l8jxyq3zq128gzp3gryxl6yjs66j2y1d7yabw2n5mv7kim";
|
2008-12-19 14:56:37 +00:00
|
|
|
};
|
|
|
|
|
2013-06-22 21:59:55 +01:00
|
|
|
# Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
|
|
|
|
propagatedBuildInputs = [ gdbm libcap ];
|
2009-05-11 22:11:25 +01:00
|
|
|
|
2011-07-07 18:24:31 +01:00
|
|
|
buildInputs =
|
|
|
|
[ pkgconfig gnum4 libtool intltool glib dbus avahi
|
2013-06-20 21:48:35 +01:00
|
|
|
libsamplerate libsndfile speex alsaLib bluez sbc udev
|
2013-06-22 21:59:55 +01:00
|
|
|
json_c
|
2011-11-06 20:03:07 +00:00
|
|
|
#gtk gconf
|
2011-07-31 20:44:58 +01:00
|
|
|
]
|
2011-11-07 17:51:04 +00:00
|
|
|
++ stdenv.lib.optional jackaudioSupport jackaudio
|
2012-10-26 17:24:48 +01:00
|
|
|
++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
|
|
|
|
++ stdenv.lib.optional useSystemd systemd;
|
2008-12-19 14:56:37 +00:00
|
|
|
|
2009-01-19 20:22:54 +00:00
|
|
|
preConfigure = ''
|
2009-12-13 20:19:19 +00:00
|
|
|
|
|
|
|
# Move the udev rules under $(prefix).
|
|
|
|
sed -i "src/Makefile.in" \
|
|
|
|
-e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g"
|
2011-11-06 20:03:07 +00:00
|
|
|
|
|
|
|
# don't install proximity-helper as root and setuid
|
|
|
|
sed -i "src/Makefile.in" \
|
|
|
|
-e "s|chown root|true |" \
|
|
|
|
-e "s|chmod r+s |true |"
|
2009-01-19 20:22:54 +00:00
|
|
|
'';
|
|
|
|
|
2008-12-19 14:56:37 +00:00
|
|
|
configureFlags = ''
|
2011-07-26 16:25:21 +01:00
|
|
|
--disable-solaris --disable-hal --disable-jack
|
2010-07-31 14:05:58 +01:00
|
|
|
--disable-oss-output --disable-oss-wrapper
|
2011-07-26 16:25:21 +01:00
|
|
|
--localstatedir=/var --sysconfdir=/etc
|
2011-07-31 20:44:58 +01:00
|
|
|
${if jackaudioSupport then "--enable-jack" else ""}
|
2008-12-19 14:56:37 +00:00
|
|
|
'';
|
|
|
|
|
2011-11-10 23:27:05 +00:00
|
|
|
installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse";
|
2011-07-26 16:25:21 +01:00
|
|
|
|
2011-07-07 18:24:31 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-12-19 14:56:37 +00:00
|
|
|
meta = {
|
|
|
|
description = "PulseAudio, a sound server for POSIX and Win32 systems";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
PulseAudio is a sound server for POSIX and Win32 systems. A
|
|
|
|
sound server is basically a proxy for your sound applications.
|
|
|
|
It allows you to do advanced operations on your sound data as it
|
|
|
|
passes between your application and your hardware. Things like
|
|
|
|
transferring the audio to a different machine, changing the
|
|
|
|
sample format or channel count and mixing several sounds into
|
|
|
|
one are easily achieved using a sound server.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.pulseaudio.org/;
|
|
|
|
|
|
|
|
# Note: Practically, the server is under the GPL due to the
|
|
|
|
# dependency on `libsamplerate'. See `LICENSE' for details.
|
|
|
|
licenses = "LGPLv2+";
|
2009-12-13 21:14:45 +00:00
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
|
|
|
platforms = stdenv.lib.platforms.gnu;
|
2008-12-19 14:56:37 +00:00
|
|
|
};
|
|
|
|
}
|