mpd: 0.20.13 -> 0.21.16 (#57608)
* Refactor mpd * mpd: 0.20.13 -> 0.21.5 Switch to meson based build, following upstream. * Fix mpd on darwin * mpd: 0.21.5 -> 0.21.6 * mpd-small: init add 0.21.6 * Update to 0.21.8 & fix ouput path Also use pname instead of name. * Update to 0.21.9 * Integrate review suggestions - Expose run function as mpdWithFeatures. - Throw on invalid feature requests. - Drop major/minor version variables. - Cosmetic improvements. * Update to 0.21.10 * mpd: 0.21.10 -> 0.21.11 * mpd: 0.21.11 -> 0.21.12 * mpd: log to journal * mpd: 0.21.12 -> 0.21.14 * mpd: add tobim to maintainers * mpd: reenable syslog support * mpd: 0.21.14 -> 0.21.15 * mpd: 0.21.15 -> 0.21.16
This commit is contained in:
parent
a95e0ac8e4
commit
4a9d5493b7
@ -18,7 +18,6 @@ let
|
|||||||
''}
|
''}
|
||||||
state_file "${cfg.dataDir}/state"
|
state_file "${cfg.dataDir}/state"
|
||||||
sticker_file "${cfg.dataDir}/sticker.sql"
|
sticker_file "${cfg.dataDir}/sticker.sql"
|
||||||
log_file "syslog"
|
|
||||||
user "${cfg.user}"
|
user "${cfg.user}"
|
||||||
group "${cfg.group}"
|
group "${cfg.group}"
|
||||||
|
|
||||||
|
@ -1,148 +1,162 @@
|
|||||||
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, glib, systemd, boost, darwin
|
{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, glib, systemd, boost, darwin
|
||||||
, alsaSupport ? true, alsaLib
|
# Inputs
|
||||||
, avahiSupport ? true, avahi, dbus
|
, curl, libmms, libnfs, samba
|
||||||
, flacSupport ? true, flac
|
# Archive support
|
||||||
, vorbisSupport ? true, libvorbis
|
, bzip2, zziplib
|
||||||
, madSupport ? true, libmad
|
# Codecs
|
||||||
, id3tagSupport ? true, libid3tag
|
, audiofile, faad2, ffmpeg, flac, fluidsynth, game-music-emu
|
||||||
, mikmodSupport ? true, libmikmod
|
, libmad, libmikmod, mpg123, libopus, libvorbis, lame
|
||||||
, shoutSupport ? true, libshout
|
# Filters
|
||||||
, sqliteSupport ? true, sqlite
|
, libsamplerate
|
||||||
, curlSupport ? true, curl
|
# Outputs
|
||||||
, audiofileSupport ? true, audiofile
|
, alsaLib, libjack2, libpulseaudio, libshout
|
||||||
, bzip2Support ? true, bzip2
|
# Misc
|
||||||
, ffmpegSupport ? true, ffmpeg
|
, icu, sqlite, avahi, dbus, pcre, libgcrypt, expat
|
||||||
, fluidsynthSupport ? true, fluidsynth
|
# Services
|
||||||
, zipSupport ? true, zziplib
|
, yajl
|
||||||
, samplerateSupport ? true, libsamplerate
|
# Client support
|
||||||
, mmsSupport ? true, libmms
|
, mpd_clientlib
|
||||||
, mpg123Support ? true, mpg123
|
# Tag support
|
||||||
, aacSupport ? true, faad2
|
, libid3tag
|
||||||
, lameSupport ? true, lame
|
|
||||||
, pulseaudioSupport ? true, libpulseaudio
|
|
||||||
, jackSupport ? true, libjack2
|
|
||||||
, gmeSupport ? true, game-music-emu
|
|
||||||
, icuSupport ? true, icu
|
|
||||||
, clientSupport ? true, mpd_clientlib
|
|
||||||
, opusSupport ? true, libopus
|
|
||||||
, soundcloudSupport ? true, yajl
|
|
||||||
, nfsSupport ? true, libnfs
|
|
||||||
, smbSupport ? true, samba
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert avahiSupport -> avahi != null && dbus != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
opt = stdenv.lib.optional;
|
lib = stdenv.lib;
|
||||||
mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}";
|
|
||||||
major = "0.20";
|
|
||||||
minor = "23";
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
featureDependencies = {
|
||||||
pname = "mpd";
|
# Storage plugins
|
||||||
version = "${major}${if minor == "" then "" else "." + minor}";
|
udisks = [ dbus ];
|
||||||
|
webdav = [ curl expat ];
|
||||||
src = fetchFromGitHub {
|
# Input plugins
|
||||||
owner = "MusicPlayerDaemon";
|
curl = [ curl ];
|
||||||
repo = "MPD";
|
mms = [ libmms ];
|
||||||
rev = "v${version}";
|
nfs = [ libnfs ];
|
||||||
sha256 = "1z1pdgiddimnmck0ardrpxkvgk1wn9zxri5wfv5ppasbb7kfm350";
|
smbclient = [ samba ];
|
||||||
|
# Archive support
|
||||||
|
bzip2 = [ bzip2 ];
|
||||||
|
zzip = [ zziplib ];
|
||||||
|
# Decoder plugins
|
||||||
|
audiofile = [ audiofile ];
|
||||||
|
faad = [ faad2 ];
|
||||||
|
ffmpeg = [ ffmpeg ];
|
||||||
|
flac = [ flac ];
|
||||||
|
fluidsynth = [ fluidsynth ];
|
||||||
|
gme = [ game-music-emu ];
|
||||||
|
mad = [ libmad ];
|
||||||
|
mikmod = [ libmikmod ];
|
||||||
|
mpg123 = [ mpg123 ];
|
||||||
|
opus = [ libopus ];
|
||||||
|
vorbis = [ libvorbis ];
|
||||||
|
# Encoder plugins
|
||||||
|
vorbisenc = [ libvorbis ];
|
||||||
|
lame = [ lame ];
|
||||||
|
# Filter plugins
|
||||||
|
libsamplerate = [ libsamplerate ];
|
||||||
|
# Output plugins
|
||||||
|
alsa = [ alsaLib ];
|
||||||
|
jack = [ libjack2 ];
|
||||||
|
pulse = [ libpulseaudio ];
|
||||||
|
shout = [ libshout ];
|
||||||
|
# Commercial services
|
||||||
|
qobuz = [ curl libgcrypt yajl ];
|
||||||
|
soundcloud = [ curl yajl ];
|
||||||
|
tidal = [ curl yajl ];
|
||||||
|
# Client support
|
||||||
|
libmpdclient = [ mpd_clientlib ];
|
||||||
|
# Tag support
|
||||||
|
id3tag = [ libid3tag ];
|
||||||
|
# Misc
|
||||||
|
dbus = [ dbus ];
|
||||||
|
expat = [ expat ];
|
||||||
|
icu = [ icu ];
|
||||||
|
pcre = [ pcre ];
|
||||||
|
sqlite = [ sqlite ];
|
||||||
|
syslog = [ ];
|
||||||
|
systemd = [ systemd ];
|
||||||
|
yajl = [ yajl ];
|
||||||
|
zeroconf = [ avahi dbus ];
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./x86.patch ];
|
run = { features ? null }:
|
||||||
|
let
|
||||||
|
# Disable platform specific features if needed
|
||||||
|
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
||||||
|
# is probably a solution, but I'm disabling it for now
|
||||||
|
platformMask = lib.optionals stdenv.isDarwin [ "mad" "pulse" "jack" "nfs" "smb" ]
|
||||||
|
++ lib.optionals (!stdenv.isLinux) [ "alsa" "systemd" "syslog" ];
|
||||||
|
|
||||||
buildInputs = [ glib boost ]
|
knownFeatures = builtins.attrNames featureDependencies;
|
||||||
++ opt stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudioKit
|
platformFeatures = lib.subtractLists platformMask knownFeatures;
|
||||||
++ opt stdenv.isLinux systemd
|
|
||||||
++ opt (stdenv.isLinux && alsaSupport) alsaLib
|
|
||||||
++ opt avahiSupport avahi
|
|
||||||
++ opt avahiSupport dbus
|
|
||||||
++ opt flacSupport flac
|
|
||||||
++ opt vorbisSupport libvorbis
|
|
||||||
# using libmad to decode mp3 files on darwin is causing a segfault -- there
|
|
||||||
# is probably a solution, but I'm disabling it for now
|
|
||||||
++ opt (!stdenv.isDarwin && madSupport) libmad
|
|
||||||
++ opt id3tagSupport libid3tag
|
|
||||||
++ opt mikmodSupport libmikmod
|
|
||||||
++ opt shoutSupport libshout
|
|
||||||
++ opt sqliteSupport sqlite
|
|
||||||
++ opt curlSupport curl
|
|
||||||
++ opt bzip2Support bzip2
|
|
||||||
++ opt audiofileSupport audiofile
|
|
||||||
++ opt ffmpegSupport ffmpeg
|
|
||||||
++ opt fluidsynthSupport fluidsynth
|
|
||||||
++ opt samplerateSupport libsamplerate
|
|
||||||
++ opt mmsSupport libmms
|
|
||||||
++ opt mpg123Support mpg123
|
|
||||||
++ opt aacSupport faad2
|
|
||||||
++ opt lameSupport lame
|
|
||||||
++ opt zipSupport zziplib
|
|
||||||
++ opt (!stdenv.isDarwin && pulseaudioSupport) libpulseaudio
|
|
||||||
++ opt (!stdenv.isDarwin && jackSupport) libjack2
|
|
||||||
++ opt gmeSupport game-music-emu
|
|
||||||
++ opt icuSupport icu
|
|
||||||
++ opt clientSupport mpd_clientlib
|
|
||||||
++ opt opusSupport libopus
|
|
||||||
++ opt soundcloudSupport yajl
|
|
||||||
++ opt (!stdenv.isDarwin && nfsSupport) libnfs
|
|
||||||
++ opt (!stdenv.isDarwin && smbSupport) samba;
|
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkgconfig ];
|
features_ = if (features == null )
|
||||||
|
then platformFeatures
|
||||||
|
else
|
||||||
|
let unknown = lib.subtractLists knownFeatures features; in
|
||||||
|
if (unknown != [])
|
||||||
|
then throw "Unknown feature(s): ${lib.concatStringsSep " " unknown}"
|
||||||
|
else
|
||||||
|
let unsupported = lib.subtractLists platformFeatures features; in
|
||||||
|
if (unsupported != [])
|
||||||
|
then throw "Feature(s) ${lib.concatStringsSep " " unsupported} are not supported on ${stdenv.hostPlatform.system}"
|
||||||
|
else features;
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
in stdenv.mkDerivation rec {
|
||||||
|
pname = "mpd";
|
||||||
|
version = "0.21.16";
|
||||||
|
|
||||||
configureFlags =
|
src = fetchFromGitHub {
|
||||||
[ (mkFlag (!stdenv.isDarwin && alsaSupport) "alsa")
|
owner = "MusicPlayerDaemon";
|
||||||
(mkFlag flacSupport "flac")
|
repo = "MPD";
|
||||||
(mkFlag vorbisSupport "vorbis")
|
rev = "v${version}";
|
||||||
(mkFlag vorbisSupport "vorbis-encoder")
|
sha256 = "0yfzn1hcyww8z5pp70n7iinycz097vjc6q9fzmfrc6ikvz3db8f4";
|
||||||
(mkFlag (!stdenv.isDarwin && madSupport) "mad")
|
};
|
||||||
(mkFlag mikmodSupport "mikmod")
|
|
||||||
(mkFlag id3tagSupport "id3")
|
|
||||||
(mkFlag shoutSupport "shout")
|
|
||||||
(mkFlag sqliteSupport "sqlite")
|
|
||||||
(mkFlag curlSupport "curl")
|
|
||||||
(mkFlag audiofileSupport "audiofile")
|
|
||||||
(mkFlag bzip2Support "bzip2")
|
|
||||||
(mkFlag ffmpegSupport "ffmpeg")
|
|
||||||
(mkFlag fluidsynthSupport "fluidsynth")
|
|
||||||
(mkFlag zipSupport "zzip")
|
|
||||||
(mkFlag samplerateSupport "lsr")
|
|
||||||
(mkFlag mmsSupport "mms")
|
|
||||||
(mkFlag mpg123Support "mpg123")
|
|
||||||
(mkFlag aacSupport "aac")
|
|
||||||
(mkFlag lameSupport "lame-encoder")
|
|
||||||
(mkFlag (!stdenv.isDarwin && pulseaudioSupport) "pulse")
|
|
||||||
(mkFlag (!stdenv.isDarwin && jackSupport) "jack")
|
|
||||||
(mkFlag stdenv.isDarwin "osx")
|
|
||||||
(mkFlag icuSupport "icu")
|
|
||||||
(mkFlag gmeSupport "gme")
|
|
||||||
(mkFlag clientSupport "libmpdclient")
|
|
||||||
(mkFlag opusSupport "opus")
|
|
||||||
(mkFlag soundcloudSupport "soundcloud")
|
|
||||||
(mkFlag (!stdenv.isDarwin && nfsSupport) "libnfs")
|
|
||||||
(mkFlag (!stdenv.isDarwin && smbSupport) "smbclient")
|
|
||||||
"--enable-debug"
|
|
||||||
"--with-zeroconf=avahi"
|
|
||||||
]
|
|
||||||
++ opt stdenv.isLinux
|
|
||||||
"--with-systemdsystemunitdir=$(out)/etc/systemd/system";
|
|
||||||
|
|
||||||
NIX_LDFLAGS = ''
|
buildInputs = [ glib boost ]
|
||||||
${if shoutSupport then "-lshout" else ""}
|
++ (lib.concatLists (lib.attrVals features_ featureDependencies))
|
||||||
'';
|
++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.AudioToolbox;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
nativeBuildInputs = [ meson ninja pkgconfig ];
|
||||||
description = "A flexible, powerful daemon for playing music";
|
|
||||||
homepage = http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki;
|
|
||||||
license = licenses.gpl2;
|
|
||||||
maintainers = with maintainers; [ astsmtl fuuzetsu ehmry fpletz ];
|
|
||||||
platforms = platforms.unix;
|
|
||||||
|
|
||||||
longDescription = ''
|
enableParallelBuilding = true;
|
||||||
Music Player Daemon (MPD) is a flexible, powerful daemon for playing
|
|
||||||
music. Through plugins and libraries it can play a variety of sound
|
mesonAutoFeatures = "disabled";
|
||||||
files while being controlled by its network protocol.
|
mesonFlags =
|
||||||
'';
|
map (x: "-D${x}=enabled") features_
|
||||||
};
|
++ map (x: "-D${x}=disabled") (lib.subtractLists features_ knownFeatures)
|
||||||
|
++ lib.optional (builtins.elem "zeroconf" features_)
|
||||||
|
"-Dzeroconf=avahi"
|
||||||
|
++ lib.optional (builtins.elem "systemd" features_)
|
||||||
|
"-Dsystemd_system_unit_dir=etc/systemd/system";
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A flexible, powerful daemon for playing music";
|
||||||
|
homepage = http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki;
|
||||||
|
license = licenses.gpl2;
|
||||||
|
maintainers = with maintainers; [ astsmtl fuuzetsu ehmry fpletz tobim ];
|
||||||
|
platforms = platforms.unix;
|
||||||
|
|
||||||
|
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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
mpd = run { };
|
||||||
|
mpd-small = run { features = [
|
||||||
|
"webdav" "curl" "mms" "bzip2" "zzip"
|
||||||
|
"audiofile" "faad" "flac" "gme" "mad"
|
||||||
|
"mpg123" "opus" "vorbis" "vorbisenc"
|
||||||
|
"lame" "libsamplerate" "shout"
|
||||||
|
"libmpdclient" "id3tag" "expat" "pcre"
|
||||||
|
"yajl" "sqlite"
|
||||||
|
"soundcloud" "qobuz" "tidal"
|
||||||
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
|
"alsa" "systemd" "syslog"
|
||||||
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
||||||
|
"mad" "jack" "nfs"
|
||||||
|
]; };
|
||||||
|
mpdWithFeatures = run;
|
||||||
}
|
}
|
||||||
|
@ -15127,7 +15127,8 @@ in
|
|||||||
mod_python = pkgs.apacheHttpdPackages.mod_python;
|
mod_python = pkgs.apacheHttpdPackages.mod_python;
|
||||||
mod_wsgi = pkgs.apacheHttpdPackages.mod_wsgi;
|
mod_wsgi = pkgs.apacheHttpdPackages.mod_wsgi;
|
||||||
|
|
||||||
mpd = callPackage ../servers/mpd (config.mpd or {});
|
inherit (callPackages ../servers/mpd { })
|
||||||
|
mpd mpd-small mpdWithFeatures;
|
||||||
|
|
||||||
mpd_clientlib = callPackage ../servers/mpd/clientlib.nix { };
|
mpd_clientlib = callPackage ../servers/mpd/clientlib.nix { };
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user