From bc331e230eb65dafd3251bc2ca72686206b0cc71 Mon Sep 17 00:00:00 2001 From: Rickard Nilsson Date: Fri, 18 Jan 2013 12:01:14 +0100 Subject: [PATCH] mpd: Update to 0.17.3 Additionally, turn on a lot more features in mpd by adding dependencies. Can be controlled by xxxSupport flags, as before. By default, everything is enabled. --- pkgs/servers/mpd/default.nix | 88 +++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 21 deletions(-) diff --git a/pkgs/servers/mpd/default.nix b/pkgs/servers/mpd/default.nix index a5cc810ada8..54c9d160565 100644 --- a/pkgs/servers/mpd/default.nix +++ b/pkgs/servers/mpd/default.nix @@ -1,39 +1,85 @@ -{ stdenv, fetchurl, pkgconfig, glib, alsaSupport ? true, alsaLib -, flacSupport ? true, flac, vorbisSupport ? true, libvorbis -, madSupport ? true, libmad, id3tagSupport ? true, libid3tag -, mikmodSupport ? true, libmikmod, cueSupport ? true, libcue +{ stdenv, fetchurl, pkgconfig, glib, systemd +, alsaSupport ? true, alsaLib +, flacSupport ? true, flac +, vorbisSupport ? true, libvorbis +, madSupport ? true, libmad +, id3tagSupport ? true, libid3tag +, mikmodSupport ? true, libmikmod , shoutSupport ? true, libshout +, sqliteSupport ? true, sqlite +, curlSupport ? true, curl +, soupSupport ? true, libsoup +, audiofileSupport ? true, audiofile +, bzip2Support ? true, bzip2 +, ffadoSupport ? true, ffado +, ffmpegSupport ? true, ffmpeg +, fluidsynthSupport ? true, fluidsynth +, zipSupport ? true, zziplib +, samplerateSupport ? true, libsamplerate +, mmsSupport ? true, libmms +, mpg123Support ? true, mpg123 +, aacSupport ? true, faad2 }: + let + opt = stdenv.lib.optional; -in -stdenv.mkDerivation rec { - name = "mpd-0.16.8"; + + mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}"; + +in stdenv.mkDerivation rec { + name = "mpd-0.17.3"; src = fetchurl { url = "mirror://sourceforge/musicpd/${name}.tar.bz2"; - sha256 = "35183ae4a706391f5d739e4378b74f516952adda09a260fecfd531a58b0fff17"; + sha256 = "1iilimlyhw22lpbqiab4qprznxg9c4d68fkrr9jww765b4c7x1ip"; }; - buildInputs = [ pkgconfig glib ] + buildInputs = [ pkgconfig glib systemd ] ++ opt alsaSupport alsaLib ++ opt flacSupport flac ++ opt vorbisSupport libvorbis ++ opt madSupport libmad ++ opt id3tagSupport libid3tag ++ opt mikmodSupport libmikmod - ++ opt cueSupport libcue - ++ opt shoutSupport libshout; + ++ opt shoutSupport libshout + ++ opt sqliteSupport sqlite + ++ opt curlSupport curl + ++ opt soupSupport libsoup + ++ opt bzip2Support bzip2 + ++ opt audiofileSupport audiofile + ++ opt ffadoSupport ffado + ++ opt ffmpegSupport ffmpeg + ++ opt fluidsynthSupport fluidsynth + ++ opt samplerateSupport libsamplerate + ++ opt mmsSupport libmms + ++ opt mpg123Support mpg123 + ++ opt aacSupport faad2 + ++ opt zipSupport zziplib; - configureFlags = '' - ${if alsaSupport then "--enable-alsa" else "--disable-alsa"} - ${if flacSupport then "--enable-flac" else "--disable-flac"} - ${if vorbisSupport then "--enable-vorbis" else "--disable-vorbis"} - ${if madSupport then "--enable-mad" else "--disable-mad"} - ${if mikmodSupport then "--enable-mikmod" else "--disable-mikmod"} - ${if id3tagSupport then "--enable-id3" else "--disable-id3"} - ${if cueSupport then "--enable-cue" else "--disable-cue"} - ${if shoutSupport then "--enable-shout" else "--disable-shout"} - ''; + configureFlags = [ + "--with-systemdsystemunitdir=$(out)/etc/systemd/system" + (mkFlag alsaSupport "alsa") + (mkFlag flacSupport "flac") + (mkFlag vorbisSupport "vorbis") + (mkFlag vorbisSupport "vorbis-encoder") + (mkFlag madSupport "mad") + (mkFlag mikmodSupport "mikmod") + (mkFlag id3tagSupport "id3") + (mkFlag shoutSupport "shout") + (mkFlag sqliteSupport "sqlite") + (mkFlag curlSupport "curl") + (mkFlag soupSupport "soup") + (mkFlag audiofileSupport "audiofile") + (mkFlag bzip2Support "bzip2") + (mkFlag ffadoSupport "ffado") + (mkFlag ffmpegSupport "ffmpeg") + (mkFlag fluidsynthSupport "fluidsynth") + (mkFlag zipSupport "zzip") + (mkFlag samplerateSupport "lsr") + (mkFlag mmsSupport "mms") + (mkFlag mpg123Support "mpg123") + (mkFlag aacSupport "aac") + ]; NIX_LDFLAGS = '' ${if shoutSupport then "-lshout" else ""}