2010-07-31 13:05:58 +00:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi
|
2013-09-06 01:47:49 +00:00
|
|
|
, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex
|
|
|
|
, bluez, sbc, udev, libcap, json_c
|
2014-07-28 10:07:44 +00:00
|
|
|
, jackaudioSupport ? false, jackaudio ? null
|
2011-11-07 17:51:04 +00:00
|
|
|
, x11Support ? false, xlibs
|
2013-09-06 01:47:49 +00:00
|
|
|
, useSystemd ? false, systemd ? null }:
|
2008-12-19 14:56:37 +00:00
|
|
|
|
2014-07-28 10:07:44 +00:00
|
|
|
assert jackaudioSupport -> jackaudio != null;
|
2008-12-19 14:56:37 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-04-18 10:22:02 +00:00
|
|
|
name = "pulseaudio-5.0";
|
2008-12-19 14:56:37 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2014-04-18 10:22:02 +00:00
|
|
|
url = "http://freedesktop.org/software/pulseaudio/releases/${name}.tar.xz";
|
|
|
|
sha256 = "0fgrr8v7yfh0byhzdv4c87v9lkj8g7gpjm8r9xrbvpa92a5kmhcr";
|
2008-12-19 14:56:37 +00:00
|
|
|
};
|
|
|
|
|
2013-06-22 20:59:55 +00:00
|
|
|
# Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated.
|
2013-09-06 01:47:49 +00:00
|
|
|
propagatedBuildInputs
|
2013-10-05 22:20:34 +00:00
|
|
|
= [ gdbm ] ++ stdenv.lib.optionals stdenv.isLinux [ libcap ];
|
2009-05-11 21:11:25 +00:00
|
|
|
|
2011-07-07 17:24:31 +00:00
|
|
|
buildInputs =
|
2013-09-06 01:47:49 +00:00
|
|
|
[ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile
|
|
|
|
speex json_c ]
|
2014-07-28 10:07:44 +00:00
|
|
|
++ stdenv.lib.optional jackaudioSupport jackaudio
|
2012-10-26 16:24:48 +00:00
|
|
|
++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ]
|
2013-09-06 01:47:49 +00:00
|
|
|
++ stdenv.lib.optional useSystemd systemd
|
2013-10-05 22:20:34 +00:00
|
|
|
++ stdenv.lib.optionals stdenv.isLinux [ alsaLib bluez sbc udev ];
|
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
|
|
|
'';
|
|
|
|
|
2013-09-06 01:47:49 +00:00
|
|
|
configureFlags =
|
|
|
|
[ "--disable-solaris" "--disable-jack" "--disable-oss-output"
|
|
|
|
"--disable-oss-wrapper" "--localstatedir=/var" "--sysconfdir=/etc" ]
|
|
|
|
++ stdenv.lib.optional jackaudioSupport "--enable-jack"
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin "--with-mac-sysroot=/";
|
2011-07-26 15:25:21 +00:00
|
|
|
|
2011-07-07 17:24:31 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2013-09-06 01:47:49 +00:00
|
|
|
# not sure what the best practices are here -- can't seem to find a way
|
|
|
|
# for the compiler to bring in stdlib and stdio (etc.) properly
|
|
|
|
# the alternative is to copy the files from /usr/include to src, but there are
|
|
|
|
# probably a large number of files that would need to be copied (I stopped
|
|
|
|
# after the seventh)
|
|
|
|
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin
|
|
|
|
"-I/usr/include";
|
|
|
|
|
|
|
|
installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse";
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2008-12-19 14:56:37 +00:00
|
|
|
description = "PulseAudio, a sound server for POSIX and Win32 systems";
|
2013-09-06 01:47:49 +00:00
|
|
|
homepage = http://www.pulseaudio.org/;
|
|
|
|
# Note: Practically, the server is under the GPL due to the
|
|
|
|
# dependency on `libsamplerate'. See `LICENSE' for details.
|
|
|
|
licenses = licenses.lgpl2Plus;
|
|
|
|
maintainers = with maintainers; [ lovek323 ];
|
|
|
|
platforms = platforms.unix;
|
2008-12-19 14:56:37 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|