diff --git a/pkgs/applications/audio/cmus/default.nix b/pkgs/applications/audio/cmus/default.nix index 8e4a08bcacc..bb2deb71ba2 100644 --- a/pkgs/applications/audio/cmus/default.nix +++ b/pkgs/applications/audio/cmus/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchFromGitHub, ncurses, pkgconfig +{ stdenv, fetchFromGitHub, runCommand, ncurses, pkgconfig +, 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 @@ -89,6 +90,13 @@ let #(mkFlag vtxSupport "CONFIG_VTX=y" libayemu) ]; + clangGCC = runCommand "clang-gcc" {} '' + #! ${stdenv.shell} + mkdir -p $out/bin + ln -s ${stdenv.cc}/bin/clang $out/bin/gcc + ln -s ${stdenv.cc}/bin/clang++ $out/bin/g++ + ''; + in stdenv.mkDerivation rec { @@ -109,13 +117,16 @@ stdenv.mkDerivation rec { "CONFIG_WAV=y" ] ++ concatMap (a: a.flags) opts); - buildInputs = [ ncurses pkgconfig ] ++ concatMap (a: a.deps) opts; + buildInputs = [ ncurses pkgconfig ] + ++ stdenv.lib.optional stdenv.cc.isClang clangGCC + ++ 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; }; } diff --git a/pkgs/development/libraries/libcddb/default.nix b/pkgs/development/libraries/libcddb/default.nix index 8645fa37c33..6a164ef9055 100644 --- a/pkgs/development/libraries/libcddb/default.nix +++ b/pkgs/development/libraries/libcddb/default.nix @@ -1,17 +1,19 @@ -{fetchurl, stdenv}: +{ stdenv, fetchurl, libiconv }: stdenv.mkDerivation rec { name = "libcddb-1.3.2"; - + src = fetchurl { url = "mirror://sourceforge/libcddb/${name}.tar.bz2"; sha256 = "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"; }; - meta = { + buildInputs = stdenv.lib.optional stdenv.isDarwin libiconv; + + meta = with stdenv.lib; { description = "C library to access data on a CDDB server (freedb.org)"; - license = stdenv.lib.licenses.lgpl2Plus; homepage = http://libcddb.sourceforge.net/; - platforms = stdenv.lib.platforms.linux; + license = licenses.lgpl2Plus; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/libraries/libcdio/0.82.nix b/pkgs/development/libraries/libcdio/0.82.nix index 9cfc5f307ed..632ee916135 100644 --- a/pkgs/development/libraries/libcdio/0.82.nix +++ b/pkgs/development/libraries/libcdio/0.82.nix @@ -1,19 +1,20 @@ -{ fetchurl, stdenv, libcddb, pkgconfig, ncurses, help2man }: +{ stdenv, fetchurl, libcddb, pkgconfig, ncurses, help2man, libiconv }: stdenv.mkDerivation rec { name = "libcdio-0.82"; - + src = fetchurl { url = "mirror://gnu/libcdio/${name}.tar.gz"; sha256 = "0fax1dzy84dzs20bmpq2gfw6hc1x2x9mhk53wynhcycjw3l3vjqs"; }; - buildInputs = [ libcddb pkgconfig ncurses help2man ]; + buildInputs = [ libcddb pkgconfig ncurses help2man ] + ++ stdenv.lib.optional stdenv.isDarwin libiconv; # Disabled because one test (check_paranoia.sh) fails. #doCheck = true; - meta = { + meta = with stdenv.lib; { description = "A library for OS-independent CD-ROM and CD image access"; longDescription = '' GNU libcdio is a library for OS-independent CD-ROM and @@ -21,8 +22,8 @@ stdenv.mkDerivation rec { ISO-9660 filesystems (libiso9660), as well as utility programs such as an audio CD player and an extractor. ''; - license = stdenv.lib.licenses.gpl2Plus; + license = licenses.gpl2Plus; homepage = http://www.gnu.org/software/libcdio/; - platforms = stdenv.lib.platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix index f0cff815c44..74c95704bbf 100644 --- a/pkgs/development/libraries/libcdio/default.nix +++ b/pkgs/development/libraries/libcdio/default.nix @@ -1,19 +1,20 @@ -{ fetchurl, stdenv, libcddb, pkgconfig, ncurses, help2man }: +{ stdenv, fetchurl, libcddb, pkgconfig, ncurses, help2man, libiconv }: stdenv.mkDerivation rec { name = "libcdio-0.93"; - + src = fetchurl { url = "mirror://gnu/libcdio/${name}.tar.bz2"; sha256 = "1a6x2c5bvpnkn7lhmxkjgz4axmh93m1clrlv41s1wzkc48lnc9zq"; }; - buildInputs = [ libcddb pkgconfig ncurses help2man ]; + buildInputs = [ libcddb pkgconfig ncurses help2man ] + ++ stdenv.lib.optional stdenv.isDarwin libiconv; # Disabled because one test (check_paranoia.sh) fails. #doCheck = true; - meta = { + meta = with stdenv.lib; { description = "A library for OS-independent CD-ROM and CD image access"; longDescription = '' GNU libcdio is a library for OS-independent CD-ROM and @@ -21,8 +22,8 @@ stdenv.mkDerivation rec { ISO-9660 filesystems (libiso9660), as well as utility programs such as an audio CD player and an extractor. ''; - license = stdenv.lib.licenses.gpl2Plus; homepage = http://www.gnu.org/software/libcdio/; - platforms = stdenv.lib.platforms.linux; + license = licenses.gpl2Plus; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/development/libraries/libcue/default.nix b/pkgs/development/libraries/libcue/default.nix index a1639397b5e..22bda89c603 100644 --- a/pkgs/development/libraries/libcue/default.nix +++ b/pkgs/development/libraries/libcue/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchFromGitHub, cmake, bison, flex }: + stdenv.mkDerivation rec { name = "libcue-${version}"; version = "2.1.0"; @@ -12,7 +13,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake bison flex ]; - meta = { + meta = with stdenv.lib; { description = "CUE Sheet Parser Library"; longDescription = '' libcue is intended to parse a so called cue sheet from a char string or @@ -20,8 +21,8 @@ stdenv.mkDerivation rec { available. ''; homepage = http://sourceforge.net/projects/libcue/; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ astsmtl ]; - platforms = with stdenv.lib.platforms; linux; + license = licenses.gpl2; + maintainers = with maintainers; [ astsmtl ]; + platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 273d187d67e..c1ca54b0587 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12793,6 +12793,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; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ba17335ebe6..224aae7b574 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -19871,9 +19871,8 @@ in { patchShebangs . ''; - buildInputs = [ - self.setuptools self.nose pkgs.pkgconfig pkgs.swig pkgs.libcdio - ]; + buildInputs = [ self.setuptools self.nose pkgs.pkgconfig pkgs.swig pkgs.libcdio ] + ++ stdenv.lib.optional stdenv.isDarwin pkgs.libiconv; patches = [ ../development/python-modules/pycdio/add-cdtext-toc.patch ];