1 { lib, stdenv, fetchsvn, fetchpatch2, pkg-config
2 , autoreconfHook, autoconf-archive
3 , ncurses, db , popt, libtool
4 , libiconv, CoreServices
6 , alsaSupport ? (!stdenv.hostPlatform.isDarwin), alsa-lib
7 , pulseSupport ? true, libpulseaudio
8 , jackSupport ? true, libjack2
11 , aacSupport ? true, faad2, libid3tag
12 , flacSupport ? true, flac
13 , midiSupport ? true, timidity
14 , modplugSupport ? true, libmodplug
15 , mp3Support ? true, libmad
16 , musepackSupport ? true, libmpc, libmpcdec, taglib
17 , vorbisSupport ? true, libvorbis
18 , speexSupport ? true, speex
19 , ffmpegSupport ? true, ffmpeg
20 , sndfileSupport ? true, libsndfile
21 , wavpackSupport ? true, wavpack
23 , curlSupport ? true, curl
24 , samplerateSupport ? true, libsamplerate
30 version = "2.6-alpha3-unstable-2019-09-14";
33 url = "svn://svn.daper.net/moc/trunk";
35 hash = "sha256-JksJxHQgQ8hPTFtLvEvZuFh2lflDNrEmDTMWWwVnjZQ=";
41 url = "https://cygwin.com/cgit/cygwin-packages/moc/plain/Support-for-recent-ffmpeg-change.patch?id=ab70f1306b8416852915be4347003aac3bdc216";
42 hash = "sha256-5hLEFBJ+7Nvxn6pNj4bngcg2qJsCzxiuP6yEj+7tvs0=";
48 url = "https://cygwin.com/cgit/cygwin-packages/moc/plain/ffmpeg-7.0.patch?id=ab70f1306b8416852915be4347003aac3bdc216e";
49 hash = "sha256-dYw6DNyw61MGfv+GdBz5Dtrr9fVph1tf7vxexWONwF8=";
53 ./use-ax-check-compile-flag.patch
54 ] ++ lib.optional pulseSupport ./pulseaudio.patch;
60 nativeBuildInputs = [ pkg-config autoreconfHook autoconf-archive ];
62 buildInputs = [ ncurses db popt libtool ]
64 ++ lib.optional alsaSupport alsa-lib
65 ++ lib.optional pulseSupport libpulseaudio
66 ++ lib.optional jackSupport libjack2
68 ++ lib.optional (aacSupport || mp3Support) libid3tag
69 ++ lib.optional aacSupport faad2
70 ++ lib.optional flacSupport flac
71 ++ lib.optional midiSupport timidity
72 ++ lib.optional modplugSupport libmodplug
73 ++ lib.optional mp3Support libmad
74 ++ lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
75 ++ lib.optional vorbisSupport libvorbis
76 ++ lib.optional speexSupport speex
77 ++ lib.optional ffmpegSupport ffmpeg
78 ++ lib.optional sndfileSupport libsndfile
79 ++ lib.optional wavpackSupport wavpack
81 ++ lib.optional curlSupport curl
82 ++ lib.optional samplerateSupport libsamplerate
83 ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv CoreServices ];
87 (lib.withFeature alsaSupport "alsa")
88 (lib.withFeature pulseSupport "pulse")
89 (lib.withFeature jackSupport "jack")
90 (lib.withFeature ossSupport "oss")
92 (lib.withFeature aacSupport "aac")
93 (lib.withFeature flacSupport "flac")
94 (lib.withFeature midiSupport "timidity")
95 (lib.withFeature modplugSupport "modplug")
96 (lib.withFeature mp3Support "mp3")
97 (lib.withFeature musepackSupport "musepack")
98 (lib.withFeature vorbisSupport "vorbis")
99 (lib.withFeature speexSupport "speex")
100 (lib.withFeature ffmpegSupport "ffmpeg")
101 (lib.withFeature sndfileSupport "sndfile")
102 (lib.withFeature wavpackSupport "wavpack")
104 (lib.withFeature curlSupport "curl")
105 (lib.withFeature samplerateSupport "samplerate")
106 ("--enable-debug=" + (if withDebug then "yes" else "no"))
112 description = "Terminal audio player designed to be powerful and easy to use";
113 homepage = "http://moc.daper.net/";
114 license = licenses.gpl2;
115 maintainers = with maintainers; [ aethelz pSub jagajaga ];
116 platforms = platforms.unix;
117 mainProgram = "mocp";