summary refs log tree commit diff
path: root/pkgs/applications/audio/cmus/default.nix
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2017-01-24 22:39:01 +0100
committerDaiderd Jordan <daiderd@gmail.com>2017-01-24 22:54:14 +0100
commit5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77 (patch)
tree11cf8ef5bbed1e2a3303ee5ce5d092cbccb222a8 /pkgs/applications/audio/cmus/default.nix
parent1e324cdd5791acf5bff5cabfa93ac37884049531 (diff)
downloadnixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar.gz
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar.bz2
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar.lz
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar.xz
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.tar.zst
nixpkgs-5afd6a9bea3fe54c642c42f3a20f7b02bf6f0a77.zip
cmus: fix on darwin (using gcc)
Diffstat (limited to 'pkgs/applications/audio/cmus/default.nix')
-rw-r--r--pkgs/applications/audio/cmus/default.nix18
1 files changed, 11 insertions, 7 deletions
diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix
index b71ffce61e2..c0fb900e3ee 100644
--- a/pkgs/applications/audio/cmus/default.nix
+++ b/pkgs/applications/audio/cmus/default.nix
@@ -1,4 +1,5 @@
-{ stdenv, fetchFromGitHub, ncurses, pkgconfig, gcc
+{ stdenv, fetchFromGitHub, ncurses, pkgconfig
+, gcc, libiconv, CoreAudio
 
 , alsaSupport ? stdenv.isLinux, alsaLib ? null
 # simple fallback for everyone else
@@ -18,7 +19,7 @@
 , cddbSupport ? true, libcddb ? null
 , cdioSupport ? true, libcdio ? null
 , cueSupport ? true, libcue ? null
-, discidSupport ? true, libdiscid ? null
+, discidSupport ? (!stdenv.isDarwin), libdiscid ? null
 , ffmpegSupport ? true, ffmpeg ? null
 , flacSupport ? true, flac ? null
 , madSupport ? true, libmad ? null
@@ -109,13 +110,16 @@ stdenv.mkDerivation rec {
     "CONFIG_WAV=y"
   ] ++ concatMap (a: a.flags) opts);
 
-  buildInputs = [ ncurses pkgconfig gcc ] ++ concatMap (a: a.deps) opts;
+  buildInputs = [ ncurses pkgconfig ]
+    ++ stdenv.lib.optional stdenv.cc.isClang gcc
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv CoreAudio ]
+    ++ concatMap (a: a.deps) opts;
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Small, fast and powerful console music player for Linux and *BSD";
     homepage = https://cmus.github.io/;
-    license = stdenv.lib.licenses.gpl2;
-    maintainers = [ stdenv.lib.maintainers.oxij ];
-    platforms = stdenv.lib.platforms.linux;
+    license = licenses.gpl2;
+    maintainers = [ maintainers.oxij ];
+    platforms = platforms.linux ++ platforms.darwin;
   };
 }