2010-04-18 20:26:30 +01:00
|
|
|
{ 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
|
2012-10-25 02:15:48 +01:00
|
|
|
, shoutSupport ? true, libshout
|
2010-04-18 20:26:30 +01:00
|
|
|
}:
|
|
|
|
let
|
|
|
|
opt = stdenv.lib.optional;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2012-10-25 02:15:48 +01:00
|
|
|
name = "mpd-0.16.8";
|
2010-04-18 20:26:30 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/musicpd/${name}.tar.bz2";
|
2012-10-25 02:15:48 +01:00
|
|
|
sha256 = "35183ae4a706391f5d739e4378b74f516952adda09a260fecfd531a58b0fff17";
|
2010-04-18 20:26:30 +01:00
|
|
|
};
|
2012-10-25 02:15:48 +01:00
|
|
|
|
2010-04-18 20:26:30 +01:00
|
|
|
buildInputs = [ pkgconfig glib ]
|
|
|
|
++ opt alsaSupport alsaLib
|
|
|
|
++ opt flacSupport flac
|
|
|
|
++ opt vorbisSupport libvorbis
|
|
|
|
++ opt madSupport libmad
|
|
|
|
++ opt id3tagSupport libid3tag
|
|
|
|
++ opt mikmodSupport libmikmod
|
2012-10-25 02:15:48 +01:00
|
|
|
++ opt cueSupport libcue
|
|
|
|
++ opt shoutSupport libshout;
|
|
|
|
|
2010-04-18 20:26:30 +01:00
|
|
|
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"}
|
2012-10-25 02:15:48 +01:00
|
|
|
${if shoutSupport then "--enable-shout" else "--disable-shout"}
|
2010-04-18 20:26:30 +01:00
|
|
|
'';
|
2012-10-25 02:15:48 +01:00
|
|
|
|
|
|
|
NIX_LDFLAGS = ''
|
|
|
|
${if shoutSupport then "-lshout" else ""}
|
|
|
|
'';
|
|
|
|
|
2010-04-18 20:26:30 +01:00
|
|
|
meta = {
|
|
|
|
description = "A flexible, powerful daemon for playing music";
|
|
|
|
longDescription = ''
|
|
|
|
Music Player Daemon (MPD) is a flexible, powerful daemon for playing
|
|
|
|
music. Through plugins and libraries it can play a variety of sound
|
|
|
|
files while being controlled by its network protocol.
|
|
|
|
'';
|
2011-06-13 17:05:03 +01:00
|
|
|
homepage = http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki;
|
2010-04-18 20:26:30 +01:00
|
|
|
license = "GPLv2";
|
|
|
|
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|