Skip to content

Commit

Permalink
bb: add Darwin compatibility
Browse files Browse the repository at this point in the history
It even has working sound, unlike on Linux!

(cherry picked from commit c49aa0d)
  • Loading branch information
alyssais authored and LnL7 committed Oct 29, 2018
1 parent dc98e14 commit 74fe437
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions 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}";
Expand All @@ -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 <malloc.h>$/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;
};
}

0 comments on commit 74fe437

Please sign in to comment.