Skip to content

Commit

Permalink
mpd: add avahi zeroconf support
Browse files Browse the repository at this point in the history
  • Loading branch information
Profpatsch committed Feb 18, 2017
1 parent 313ccd5 commit 31dac10
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 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
Expand All @@ -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}";
Expand All @@ -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
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 31dac10

Please sign in to comment.