diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-05-24 18:25:09 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-05-24 18:25:09 +0000 |
commit | cb026a2bd22d2656d88a7883e44caa31402d7646 (patch) | |
tree | 804c389adfe6dc6deb38dfd90167b03b4f828bce /nixpkgs/pkgs/applications/audio/moc/default.nix | |
parent | 5781972383d0382dc9353ac720a5d751ca17cd05 (diff) | |
parent | 650a295621b27c4ebe0fa64a63fd25323e64deb3 (diff) | |
download | nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar.gz nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar.bz2 nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar.lz nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar.xz nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.tar.zst nixlib-cb026a2bd22d2656d88a7883e44caa31402d7646.zip |
Merge commit '650a295621b27c4ebe0fa64a63fd25323e64deb3'
Diffstat (limited to 'nixpkgs/pkgs/applications/audio/moc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/audio/moc/default.nix | 93 |
1 files changed, 84 insertions, 9 deletions
diff --git a/nixpkgs/pkgs/applications/audio/moc/default.nix b/nixpkgs/pkgs/applications/audio/moc/default.nix index ea83a1012ebb..3ed330cc7437 100644 --- a/nixpkgs/pkgs/applications/audio/moc/default.nix +++ b/nixpkgs/pkgs/applications/audio/moc/default.nix @@ -1,9 +1,35 @@ -{ stdenv, fetchurl, ncurses, pkgconfig, alsaLib, flac, libmad, speex, ffmpeg -, libvorbis, libmpc, libsndfile, libjack2, db, libmodplug, timidity, libid3tag -, libtool +{ stdenv, fetchurl, pkgconfig +, ncurses, db , popt, libtool +# Sound sub-systems +, alsaSupport ? true, alsaLib +, pulseSupport ? true, libpulseaudio, autoreconfHook +, jackSupport ? true, libjack2 +, ossSupport ? true +# Audio formats +, aacSupport ? true, faad2, libid3tag +, flacSupport ? true, flac +, midiSupport ? true, timidity +, modplugSupport ? true, libmodplug +, mp3Support ? true, libmad +, musepackSupport ? true, libmpc, libmpcdec, taglib +, vorbisSupport ? true, libvorbis +, speexSupport ? true, speex +, ffmpegSupport ? true, ffmpeg +, sndfileSupport ? true, libsndfile +, wavpackSupport ? true, wavpack +# Misc +, withffmpeg4 ? false, ffmpeg_4 +, curlSupport ? true, curl +, samplerateSupport ? true, libsamplerate +, withDebug ? false }: -stdenv.mkDerivation rec { +let + opt = stdenv.lib.optional; + mkFlag = c: f: if c then "--with-${f}" else "--without-${f}"; + +in stdenv.mkDerivation rec { + name = "moc-${version}"; version = "2.5.2"; @@ -12,18 +38,67 @@ stdenv.mkDerivation rec { sha256 = "026v977kwb0wbmlmf6mnik328plxg8wykfx9ryvqhirac0aq39pk"; }; - nativeBuildInputs = [ pkgconfig ]; + patches = [] + ++ opt withffmpeg4 ./moc-ffmpeg4.patch + ++ opt pulseSupport ./pulseaudio.patch; + + nativeBuildInputs = [ pkgconfig ] + ++ opt pulseSupport autoreconfHook; + + buildInputs = [ ncurses db popt libtool ] + # Sound sub-systems + ++ opt alsaSupport alsaLib + ++ opt pulseSupport libpulseaudio + ++ opt jackSupport libjack2 + # Audio formats + ++ opt (aacSupport || mp3Support) libid3tag + ++ opt aacSupport faad2 + ++ opt flacSupport flac + ++ opt midiSupport timidity + ++ opt modplugSupport libmodplug + ++ opt mp3Support libmad + ++ opt musepackSupport [ libmpc libmpcdec taglib ] + ++ opt vorbisSupport libvorbis + ++ opt speexSupport speex + ++ opt (ffmpegSupport && !withffmpeg4) ffmpeg + ++ opt (ffmpegSupport && withffmpeg4) ffmpeg_4 + ++ opt sndfileSupport libsndfile + ++ opt wavpackSupport wavpack + # Misc + ++ opt curlSupport curl + ++ opt samplerateSupport libsamplerate; - buildInputs = [ - ncurses alsaLib flac libmad speex ffmpeg libvorbis libmpc libsndfile libjack2 - db libmodplug timidity libid3tag libtool + configureFlags = [ + # Sound sub-systems + (mkFlag alsaSupport "alsa") + (mkFlag pulseSupport "pulse") + (mkFlag jackSupport "jack") + (mkFlag ossSupport "oss") + # Audio formats + (mkFlag aacSupport "aac") + (mkFlag flacSupport "flac") + (mkFlag midiSupport "timidity") + (mkFlag modplugSupport "modplug") + (mkFlag mp3Support "mp3") + (mkFlag musepackSupport "musepack") + (mkFlag vorbisSupport "vorbis") + (mkFlag speexSupport "speex") + (mkFlag ffmpegSupport "ffmpeg") + (mkFlag sndfileSupport "sndfile") + (mkFlag wavpackSupport "wavpack") + # Misc + (mkFlag curlSupport "curl") + (mkFlag samplerateSupport "samplerate") + ("--enable-debug=" + (if withDebug then "yes" else "no")) + "--disable-cache" + "--without-rcc" ]; meta = with stdenv.lib; { description = "An ncurses console audio player designed to be powerful and easy to use"; homepage = http://moc.daper.net/; license = licenses.gpl2; - maintainers = with maintainers; [ pSub jagajaga ]; + maintainers = with maintainers; [ aethelz pSub jagajaga ]; platforms = platforms.linux; }; } |