From b9234ea49c6bfb71d1435fd584ae83123f61fa67 Mon Sep 17 00:00:00 2001 From: Johannes Frankenau Date: Sat, 21 Jul 2018 23:19:34 +0200 Subject: [PATCH] nixos/mpd: allow storage plugins in musicDirectory --- nixos/modules/services/audio/mpd.nix | 4 ++-- pkgs/servers/mpd/default.nix | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 3add6556d0df..5bfe2b6a22ad 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -55,11 +55,11 @@ in { }; musicDirectory = mkOption { - type = types.path; + type = with types; either path (strMatching "(http|https|nfs|smb)://.+"); default = "${cfg.dataDir}/music"; defaultText = ''''${dataDir}/music''; description = '' - The directory where mpd reads music from. + The directory or NFS/SMB network share where mpd reads music from. ''; }; diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index d22beac6e9da..b88b13cdf16f 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -84,8 +84,8 @@ in stdenv.mkDerivation rec { ++ opt clientSupport mpd_clientlib ++ opt opusSupport libopus ++ opt soundcloudSupport yajl - ++ opt nfsSupport libnfs - ++ opt smbSupport smbclient; + ++ opt (!stdenv.isDarwin && nfsSupport) libnfs + ++ opt (!stdenv.isDarwin && smbSupport) smbclient; nativeBuildInputs = [ autoreconfHook pkgconfig ]; @@ -120,8 +120,8 @@ in stdenv.mkDerivation rec { (mkFlag clientSupport "libmpdclient") (mkFlag opusSupport "opus") (mkFlag soundcloudSupport "soundcloud") - (mkFlag nfsSupport "libnfs") - (mkFlag smbSupport "smbclient") + (mkFlag (!stdenv.isDarwin && nfsSupport) "libnfs") + (mkFlag (!stdenv.isDarwin && smbSupport) "smbclient") "--enable-debug" "--with-zeroconf=avahi" ]