summary refs log tree commit diff
path: root/pkgs/applications/audio/moc/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/audio/moc/default.nix')
-rw-r--r--pkgs/applications/audio/moc/default.nix22
1 files changed, 10 insertions, 12 deletions
diff --git a/pkgs/applications/audio/moc/default.nix b/pkgs/applications/audio/moc/default.nix
index 9f68f8bb8e8..1d26782b6ae 100644
--- a/pkgs/applications/audio/moc/default.nix
+++ b/pkgs/applications/audio/moc/default.nix
@@ -1,7 +1,7 @@
-{ stdenv, fetchurl, pkgconfig
+{ lib, stdenv, fetchurl, pkg-config
 , ncurses, db , popt, libtool
 # Sound sub-systems
-, alsaSupport ? true, alsaLib
+, alsaSupport ? true, alsa-lib
 , pulseSupport ? true, libpulseaudio, autoreconfHook
 , jackSupport ? true, libjack2
 , ossSupport ? true
@@ -14,18 +14,17 @@
 , musepackSupport ? true, libmpc, libmpcdec, taglib
 , vorbisSupport ? true, libvorbis
 , speexSupport ? true, speex
-, ffmpegSupport ? true, ffmpeg_3
+, ffmpegSupport ? true, ffmpeg
 , sndfileSupport ? true, libsndfile
 , wavpackSupport ? true, wavpack
 # Misc
-, withffmpeg4 ? false, ffmpeg_4
 , curlSupport ? true, curl
 , samplerateSupport ? true, libsamplerate
 , withDebug ? false
 }:
 
 let
-  opt = stdenv.lib.optional;
+  opt = lib.optional;
   mkFlag = c: f: if c then "--with-${f}" else "--without-${f}";
 
 in stdenv.mkDerivation rec {
@@ -39,15 +38,15 @@ in stdenv.mkDerivation rec {
   };
 
   patches = []
-    ++ opt withffmpeg4 ./moc-ffmpeg4.patch
+    ++ opt ffmpegSupport ./moc-ffmpeg4.patch
     ++ opt pulseSupport ./pulseaudio.patch;
 
-  nativeBuildInputs = [ pkgconfig ]
+  nativeBuildInputs = [ pkg-config ]
     ++ opt pulseSupport autoreconfHook;
 
   buildInputs = [ ncurses db popt libtool ]
     # Sound sub-systems
-    ++ opt alsaSupport alsaLib
+    ++ opt alsaSupport alsa-lib
     ++ opt pulseSupport libpulseaudio
     ++ opt jackSupport libjack2
     # Audio formats
@@ -57,11 +56,10 @@ in stdenv.mkDerivation rec {
     ++ opt midiSupport timidity
     ++ opt modplugSupport libmodplug
     ++ opt mp3Support libmad
-    ++ stdenv.lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
+    ++ lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
     ++ opt vorbisSupport libvorbis
     ++ opt speexSupport speex
-    ++ opt (ffmpegSupport && !withffmpeg4) ffmpeg_3
-    ++ opt (ffmpegSupport && withffmpeg4) ffmpeg_4
+    ++ opt ffmpegSupport ffmpeg
     ++ opt sndfileSupport libsndfile
     ++ opt wavpackSupport wavpack
     # Misc
@@ -94,7 +92,7 @@ in stdenv.mkDerivation rec {
     "--without-rcc"
   ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An ncurses console audio player designed to be powerful and easy to use";
     homepage = "http://moc.daper.net/";
     license = licenses.gpl2;