cmus: fix on darwin (using gcc)

This commit is contained in:
Daiderd Jordan 2017-01-24 22:39:01 +01:00
parent 1e324cdd57
commit 5afd6a9bea
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 12 additions and 7 deletions

View file

@ -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;
};
}

View file

@ -12690,6 +12690,7 @@ with pkgs;
cmatrix = callPackage ../applications/misc/cmatrix { };
cmus = callPackage ../applications/audio/cmus {
inherit (darwin.apple_sdk.frameworks) CoreAudio;
libjack = libjack2;
libcdio = libcdio082;
ffmpeg = ffmpeg_2;