mpd: add avahi zeroconf support
This commit is contained in:
parent
313ccd5be3
commit
31dac10c33
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, glib, systemd, boost, darwin
|
{ stdenv, fetchurl, pkgconfig, glib, systemd, boost, darwin
|
||||||
, alsaSupport ? true, alsaLib
|
, alsaSupport ? true, alsaLib
|
||||||
|
, avahiSupport ? true, avahi, dbus
|
||||||
, flacSupport ? true, flac
|
, flacSupport ? true, flac
|
||||||
, vorbisSupport ? true, libvorbis
|
, vorbisSupport ? true, libvorbis
|
||||||
, madSupport ? true, libmad
|
, madSupport ? true, libmad
|
||||||
@ -26,6 +27,8 @@
|
|||||||
, soundcloudSupport ? true, yajl
|
, soundcloudSupport ? true, yajl
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
assert avahiSupport -> avahi != null && dbus != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
opt = stdenv.lib.optional;
|
opt = stdenv.lib.optional;
|
||||||
mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
|
mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
|
||||||
@ -45,6 +48,8 @@ in stdenv.mkDerivation rec {
|
|||||||
++ opt stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudioKit
|
++ opt stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudioKit
|
||||||
++ opt stdenv.isLinux systemd
|
++ opt stdenv.isLinux systemd
|
||||||
++ opt (stdenv.isLinux && alsaSupport) alsaLib
|
++ opt (stdenv.isLinux && alsaSupport) alsaLib
|
||||||
|
++ opt avahiSupport avahi
|
||||||
|
++ opt avahiSupport dbus
|
||||||
++ opt flacSupport flac
|
++ opt flacSupport flac
|
||||||
++ opt vorbisSupport libvorbis
|
++ opt vorbisSupport libvorbis
|
||||||
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
||||||
@ -101,6 +106,7 @@ in stdenv.mkDerivation rec {
|
|||||||
(mkFlag opusSupport "opus")
|
(mkFlag opusSupport "opus")
|
||||||
(mkFlag soundcloudSupport "soundcloud")
|
(mkFlag soundcloudSupport "soundcloud")
|
||||||
"--enable-debug"
|
"--enable-debug"
|
||||||
|
"--with-zeroconf=avahi"
|
||||||
]
|
]
|
||||||
++ opt stdenv.isLinux
|
++ opt stdenv.isLinux
|
||||||
"--with-systemdsystemunitdir=$(out)/etc/systemd/system";
|
"--with-systemdsystemunitdir=$(out)/etc/systemd/system";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user