git.iko.soy/typeable/nixpkgs
on master help sign in
mpd: add avahi zeroconf support
commit31dac10c330faf453ba946cbf558c04ca19102b9 authorProfpatsch <mail@profpatsch.de> dateThu 16 Feb 2017, 01:17 (10 years ago) parent313ccd5
1 file changed+6
pkgs/servers/mpd/default.nix+6
pkgs/servers/mpd/default.nix+6
@@ -1,5 +1,6 @@
11{ stdenv, fetchurl, pkgconfig, glib, systemd, boost, darwin
22, alsaSupport ? true, alsaLib
3+, avahiSupport ? true, avahi, dbus
34, flacSupport ? true, flac
45, vorbisSupport ? true, libvorbis
56, madSupport ? true, libmad
@@ -26,6 +27,8 @@
2627, soundcloudSupport ? true, yajl
2728}:
2829
30+assert avahiSupport -> avahi != null && dbus != null;
31+
2932let
3033 opt = stdenv.lib.optional;
3134 mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
@@ -45,6 +48,8 @@ in stdenv.mkDerivation rec {
4548 ++ opt stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudioKit
4649 ++ opt stdenv.isLinux systemd
4750 ++ opt (stdenv.isLinux && alsaSupport) alsaLib
51+ ++ opt avahiSupport avahi
52+ ++ opt avahiSupport dbus
4853 ++ opt flacSupport flac
4954 ++ opt vorbisSupport libvorbis
5055 # using libmad to decode mp3 files on darwin is causing a segfault -- there
@@ -101,6 +106,7 @@ in stdenv.mkDerivation rec {
101106 (mkFlag opusSupport "opus")
102107 (mkFlag soundcloudSupport "soundcloud")
103108 "--enable-debug"
109+ "--with-zeroconf=avahi"
104110 ]
105111 ++ opt stdenv.isLinux
106112 "--with-systemdsystemunitdir=$(out)/etc/systemd/system";