diff options
author | Profpatsch <mail@profpatsch.de> | 2017-02-16 01:17:31 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-02-18 16:03:16 +0100 |
commit | 31dac10c330faf453ba946cbf558c04ca19102b9 (patch) | |
tree | 694d9fdfa2da2397435f7075792a1dab5867bf6a /pkgs/servers | |
parent | 313ccd5be3bfe780356615d22e54428fdb4c165b (diff) |
mpd: add avahi zeroconf support
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/mpd/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index b1aa80341436..e2ec4a7617d2 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig, glib, systemd, boost, darwin , alsaSupport ? true, alsaLib +, avahiSupport ? true, avahi, dbus , flacSupport ? true, flac , vorbisSupport ? true, libvorbis , madSupport ? true, libmad @@ -26,6 +27,8 @@ , soundcloudSupport ? true, yajl }: +assert avahiSupport -> avahi != null && dbus != null; + let opt = stdenv.lib.optional; 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.isLinux systemd ++ opt (stdenv.isLinux && alsaSupport) alsaLib + ++ opt avahiSupport avahi + ++ opt avahiSupport dbus ++ opt flacSupport flac ++ opt vorbisSupport libvorbis # 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 soundcloudSupport "soundcloud") "--enable-debug" + "--with-zeroconf=avahi" ] ++ opt stdenv.isLinux "--with-systemdsystemunitdir=$(out)/etc/systemd/system"; |