servers/mpd: Updated to 0.16.
[nixpkgs-libre.git] / pkgs / servers / mpd / default.nix
blobfd2f801d92ea0208416d9e9649a8074b4eb4ae20
1 { stdenv, fetchurl, pkgconfig, glib, alsaSupport ? true, alsaLib
2 , flacSupport ? true, flac, vorbisSupport ? true, libvorbis
3 , madSupport ? true, libmad, id3tagSupport ? true, libid3tag
4 , mikmodSupport ? true, libmikmod, cueSupport ? true, libcue
5 }:
6 let
7   opt = stdenv.lib.optional;
8 in
9 stdenv.mkDerivation rec {
10   name = "mpd-0.16";
11   src = fetchurl {
12     url = "mirror://sourceforge/musicpd/${name}.tar.bz2";
13     sha256 = "0sy0ra9wmqp6a2207lhz0b2k5dmfw2bgic9mawbgn17j80aikbg2";
14   };
15   buildInputs = [ pkgconfig glib ]
16     ++ opt alsaSupport alsaLib
17     ++ opt flacSupport flac
18     ++ opt vorbisSupport libvorbis
19     ++ opt madSupport libmad
20     ++ opt id3tagSupport libid3tag
21     ++ opt mikmodSupport libmikmod
22     ++ opt cueSupport libcue;
23   configureFlags = ''
24     ${if alsaSupport then "--enable-alsa" else "--disable-alsa"}
25     ${if flacSupport then "--enable-flac" else "--disable-flac"}
26     ${if vorbisSupport then "--enable-vorbis" else "--disable-vorbis"}
27     ${if madSupport then "--enable-mad" else "--disable-mad"}
28     ${if mikmodSupport then "--enable-mikmod" else "--disable-mikmod"}
29     ${if id3tagSupport then "--enable-id3" else "--disable-id3"}
30     ${if cueSupport then "--enable-cue" else "--disable-cue"}
31   '';
32   meta = {
33     description = "A flexible, powerful daemon for playing music";
34     longDescription = ''
35       Music Player Daemon (MPD) is a flexible, powerful daemon for playing
36       music. Through plugins and libraries it can play a variety of sound
37       files while being controlled by its network protocol.
38     '';
39     homepage = http://mpd.wikia.com/;
40     license = "GPLv2";
41     maintainers = with stdenv.lib.maintainers; [ astsmtl ];
42     platforms = with stdenv.lib.platforms; linux;
43   };