diff options
Diffstat (limited to 'customized/mpd.nix')
| -rw-r--r-- | customized/mpd.nix | 126 |
1 files changed, 0 insertions, 126 deletions
diff --git a/customized/mpd.nix b/customized/mpd.nix deleted file mode 100644 index 7500bd62..00000000 --- a/customized/mpd.nix +++ /dev/null | |||
| @@ -1,126 +0,0 @@ | |||
| 1 | { stdenv, fetchurl, pkgconfig, glib, systemd, boost | ||
| 2 | , alsaSupport ? true, alsaLib | ||
| 3 | , flacSupport ? true, flac | ||
| 4 | , vorbisSupport ? true, libvorbis | ||
| 5 | , madSupport ? true, libmad | ||
| 6 | , id3tagSupport ? true, libid3tag | ||
| 7 | , mikmodSupport ? true, libmikmod | ||
| 8 | , shoutSupport ? true, libshout | ||
| 9 | , sqliteSupport ? true, sqlite | ||
| 10 | , curlSupport ? true, curl | ||
| 11 | , audiofileSupport ? true, audiofile | ||
| 12 | , bzip2Support ? true, bzip2 | ||
| 13 | , ffmpegSupport ? true, ffmpeg | ||
| 14 | , fluidsynthSupport ? true, fluidsynth | ||
| 15 | , zipSupport ? true, zziplib | ||
| 16 | , samplerateSupport ? true, libsamplerate | ||
| 17 | , mmsSupport ? true, libmms | ||
| 18 | , mpg123Support ? true, mpg123 | ||
| 19 | , aacSupport ? true, faad2 | ||
| 20 | , pulseaudioSupport ? true, pulseaudio | ||
| 21 | , jackSupport ? true, jack2 | ||
| 22 | , gmeSupport ? true, game-music-emu | ||
| 23 | , icuSupport ? true, icu | ||
| 24 | , clientSupport ? false, mpd_clientlib | ||
| 25 | , opusSupport ? true, libopus | ||
| 26 | , makeWrapper | ||
| 27 | }: | ||
| 28 | |||
| 29 | let | ||
| 30 | opt = stdenv.lib.optional; | ||
| 31 | mkFlag = c: f: if c then "--enable-${f}" else "--disable-${f}"; | ||
| 32 | major = "0.19"; | ||
| 33 | minor = "9"; | ||
| 34 | |||
| 35 | in stdenv.mkDerivation rec { | ||
| 36 | name = "mpd-${major}.${minor}"; | ||
| 37 | src = fetchurl { | ||
| 38 | url = "http://www.musicpd.org/download/mpd/${major}/${name}.tar.xz"; | ||
| 39 | sha256 = "0vzj365s4j0pw5w37lfhx3dmpkdp85driravsvx8rlrw0lii91a7"; | ||
| 40 | }; | ||
| 41 | |||
| 42 | buildInputs = [ pkgconfig glib boost makeWrapper ] | ||
| 43 | ++ opt stdenv.isLinux systemd | ||
| 44 | ++ opt (stdenv.isLinux && alsaSupport) alsaLib | ||
| 45 | ++ opt flacSupport flac | ||
| 46 | ++ opt vorbisSupport libvorbis | ||
| 47 | # using libmad to decode mp3 files on darwin is causing a segfault -- there | ||
| 48 | # is probably a solution, but I'm disabling it for now | ||
| 49 | ++ opt (!stdenv.isDarwin && madSupport) libmad | ||
| 50 | ++ opt id3tagSupport libid3tag | ||
| 51 | ++ opt mikmodSupport libmikmod | ||
| 52 | ++ opt shoutSupport libshout | ||
| 53 | ++ opt sqliteSupport sqlite | ||
| 54 | ++ opt curlSupport curl | ||
| 55 | ++ opt bzip2Support bzip2 | ||
| 56 | ++ opt audiofileSupport audiofile | ||
| 57 | ++ opt ffmpegSupport ffmpeg | ||
| 58 | ++ opt fluidsynthSupport fluidsynth | ||
| 59 | ++ opt samplerateSupport libsamplerate | ||
| 60 | ++ opt mmsSupport libmms | ||
| 61 | ++ opt mpg123Support mpg123 | ||
| 62 | ++ opt aacSupport faad2 | ||
| 63 | ++ opt zipSupport zziplib | ||
| 64 | ++ opt pulseaudioSupport pulseaudio | ||
| 65 | ++ opt jackSupport jack2 | ||
| 66 | ++ opt gmeSupport game-music-emu | ||
| 67 | ++ opt icuSupport icu | ||
| 68 | ++ opt clientSupport mpd_clientlib | ||
| 69 | ++ opt opusSupport libopus; | ||
| 70 | |||
| 71 | configureFlags = | ||
| 72 | [ (mkFlag (!stdenv.isDarwin && alsaSupport) "alsa") | ||
| 73 | (mkFlag flacSupport "flac") | ||
| 74 | (mkFlag vorbisSupport "vorbis") | ||
| 75 | (mkFlag vorbisSupport "vorbis-encoder") | ||
| 76 | (mkFlag (!stdenv.isDarwin && madSupport) "mad") | ||
| 77 | (mkFlag mikmodSupport "mikmod") | ||
| 78 | (mkFlag id3tagSupport "id3") | ||
| 79 | (mkFlag shoutSupport "shout") | ||
| 80 | (mkFlag sqliteSupport "sqlite") | ||
| 81 | (mkFlag curlSupport "curl") | ||
| 82 | (mkFlag audiofileSupport "audiofile") | ||
| 83 | (mkFlag bzip2Support "bzip2") | ||
| 84 | (mkFlag ffmpegSupport "ffmpeg") | ||
| 85 | (mkFlag fluidsynthSupport "fluidsynth") | ||
| 86 | (mkFlag zipSupport "zzip") | ||
| 87 | (mkFlag samplerateSupport "lsr") | ||
| 88 | (mkFlag mmsSupport "mms") | ||
| 89 | (mkFlag mpg123Support "mpg123") | ||
| 90 | (mkFlag aacSupport "aac") | ||
| 91 | (mkFlag pulseaudioSupport "pulse") | ||
| 92 | (mkFlag jackSupport "jack") | ||
| 93 | (mkFlag stdenv.isDarwin "osx") | ||
| 94 | (mkFlag icuSupport "icu") | ||
| 95 | (mkFlag gmeSupport "gme") | ||
| 96 | (mkFlag clientSupport "libmpdclient") | ||
| 97 | (mkFlag opusSupport "opus") | ||
| 98 | "--enable-debug" | ||
| 99 | ] | ||
| 100 | ++ opt stdenv.isLinux | ||
| 101 | "--with-systemdsystemunitdir=$(out)/etc/systemd/system"; | ||
| 102 | |||
| 103 | postInstall = '' | ||
| 104 | wrapProgram $out/bin/mpd \ | ||
| 105 | --set JACK_PROMISCUOUS_SERVER 1 \ | ||
| 106 | --run "umask 0" | ||
| 107 | ''; | ||
| 108 | |||
| 109 | NIX_LDFLAGS = '' | ||
| 110 | ${if shoutSupport then "-lshout" else ""} | ||
| 111 | ''; | ||
| 112 | |||
| 113 | meta = with stdenv.lib; { | ||
| 114 | description = "A flexible, powerful daemon for playing music"; | ||
| 115 | homepage = http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki; | ||
| 116 | license = licenses.gpl2; | ||
| 117 | maintainers = with maintainers; [ astsmtl fuuzetsu emery ]; | ||
| 118 | platforms = platforms.unix; | ||
| 119 | |||
| 120 | longDescription = '' | ||
| 121 | Music Player Daemon (MPD) is a flexible, powerful daemon for playing | ||
| 122 | music. Through plugins and libraries it can play a variety of sound | ||
| 123 | files while being controlled by its network protocol. | ||
| 124 | ''; | ||
| 125 | }; | ||
| 126 | } | ||
