|
|
|
@ -1,11 +1,9 @@ |
|
|
|
|
{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, avahi |
|
|
|
|
, gconf, gtk, intltool, gettext |
|
|
|
|
, alsaLib, libsamplerate, libsndfile, speex, bluez, sbc, udev, libcap |
|
|
|
|
, gconf, gtk, intltool, gettext, alsaLib, libsamplerate, libsndfile, speex |
|
|
|
|
, bluez, sbc, udev, libcap, json_c |
|
|
|
|
, jackaudioSupport ? false, jackaudio ? null |
|
|
|
|
, x11Support ? false, xlibs |
|
|
|
|
, json_c |
|
|
|
|
, useSystemd ? false, systemd ? null |
|
|
|
|
}: |
|
|
|
|
, useSystemd ? false, systemd ? null }: |
|
|
|
|
|
|
|
|
|
assert jackaudioSupport -> jackaudio != null; |
|
|
|
|
|
|
|
|
@ -18,20 +16,18 @@ stdenv.mkDerivation rec { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
# Since `libpulse*.la' contain `-lgdbm' and `-lcap', it must be propagated. |
|
|
|
|
propagatedBuildInputs = [ gdbm libcap ]; |
|
|
|
|
propagatedBuildInputs |
|
|
|
|
= [ gdbm ] ++ stdenv.lib.optionals (!stdenv.isDarwin) [ libcap ]; |
|
|
|
|
|
|
|
|
|
buildInputs = |
|
|
|
|
[ pkgconfig gnum4 libtool intltool glib dbus avahi |
|
|
|
|
libsamplerate libsndfile speex alsaLib bluez sbc udev |
|
|
|
|
json_c |
|
|
|
|
#gtk gconf |
|
|
|
|
] |
|
|
|
|
[ pkgconfig gnum4 libtool intltool glib dbus avahi libsamplerate libsndfile |
|
|
|
|
speex json_c ] |
|
|
|
|
++ stdenv.lib.optional jackaudioSupport jackaudio |
|
|
|
|
++ stdenv.lib.optionals x11Support [ xlibs.xlibs xlibs.libXtst xlibs.libXi ] |
|
|
|
|
++ stdenv.lib.optional useSystemd systemd; |
|
|
|
|
++ stdenv.lib.optional useSystemd systemd |
|
|
|
|
++ stdenv.lib.optionals (!stdenv.isDarwin) [ alsaLib bluez sbc udev ]; |
|
|
|
|
|
|
|
|
|
preConfigure = '' |
|
|
|
|
|
|
|
|
|
# Move the udev rules under $(prefix). |
|
|
|
|
sed -i "src/Makefile.in" \ |
|
|
|
|
-e "s|udevrulesdir[[:blank:]]*=.*$|udevrulesdir = $out/lib/udev/rules.d|g" |
|
|
|
@ -42,19 +38,32 @@ stdenv.mkDerivation rec { |
|
|
|
|
-e "s|chmod r+s |true |" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
configureFlags = '' |
|
|
|
|
--disable-solaris --disable-hal --disable-jack |
|
|
|
|
--disable-oss-output --disable-oss-wrapper |
|
|
|
|
--localstatedir=/var --sysconfdir=/etc |
|
|
|
|
${if jackaudioSupport then "--enable-jack" else ""} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
installFlags = "sysconfdir=$(out)/etc pulseconfdir=$(out)/etc/pulse"; |
|
|
|
|
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=/"; |
|
|
|
|
|
|
|
|
|
enableParallelBuilding = true; |
|
|
|
|
|
|
|
|
|
meta = { |
|
|
|
|
# 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; { |
|
|
|
|
description = "PulseAudio, a sound server for POSIX and Win32 systems"; |
|
|
|
|
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; |
|
|
|
|
|
|
|
|
|
longDescription = '' |
|
|
|
|
PulseAudio is a sound server for POSIX and Win32 systems. A |
|
|
|
@ -65,14 +74,5 @@ stdenv.mkDerivation rec { |
|
|
|
|
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+"; |
|
|
|
|
|
|
|
|
|
maintainers = [ ]; |
|
|
|
|
platforms = stdenv.lib.platforms.gnu; |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|