diff --git a/pkgs/applications/misc/bb/default.nix b/pkgs/applications/misc/bb/default.nix index 0689843af612..f085e4bd7dd5 100644 --- a/pkgs/applications/misc/bb/default.nix +++ b/pkgs/applications/misc/bb/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, aalib, ncurses, xorg, libmikmod }: +{ stdenv, lib, fetchurl, darwin, aalib, ncurses, xorg, libmikmod }: stdenv.mkDerivation rec { name = "bb-${version}"; @@ -12,13 +12,17 @@ stdenv.mkDerivation rec { buildInputs = [ aalib ncurses libmikmod xorg.libXau xorg.libXdmcp xorg.libX11 - ]; + ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudio; - meta = with stdenv.lib; { + postPatch = lib.optionalString stdenv.isDarwin '' + sed -i -e '/^#include $/d' *.c + ''; + + meta = with lib; { homepage = http://aa-project.sourceforge.net/bb; description = "AA-lib demo"; license = licenses.gpl2; maintainers = [ maintainers.rnhmjoj ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/development/libraries/libmikmod/default.nix b/pkgs/development/libraries/libmikmod/default.nix index c509fcd2b4f8..c83d2610dbfa 100644 --- a/pkgs/development/libraries/libmikmod/default.nix +++ b/pkgs/development/libraries/libmikmod/default.nix @@ -11,7 +11,7 @@ in stdenv.mkDerivation rec { }; buildInputs = [ texinfo ] - ++ optionals stdenv.isLinux [ alsaLib libpulseaudio ] + ++ optional stdenv.isLinux alsaLib ++ optional stdenv.isDarwin CoreAudio; propagatedBuildInputs = optional stdenv.isLinux libpulseaudio;