Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

bb: add Darwin compatibility

It even has working sound, unlike on Linux!

+8 -4
+8 -4
pkgs/applications/misc/bb/default.nix
··· 1 - { stdenv, fetchurl, aalib, ncurses, xorg, libmikmod }: 1 + { stdenv, lib, fetchurl, darwin, aalib, ncurses, xorg, libmikmod }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "bb-${version}"; ··· 12 12 buildInputs = [ 13 13 aalib ncurses libmikmod 14 14 xorg.libXau xorg.libXdmcp xorg.libX11 15 - ]; 15 + ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudio; 16 16 17 - meta = with stdenv.lib; { 17 + postPatch = lib.optionalString stdenv.isDarwin '' 18 + sed -i -e '/^#include <malloc.h>$/d' *.c 19 + ''; 20 + 21 + meta = with lib; { 18 22 homepage = http://aa-project.sourceforge.net/bb; 19 23 description = "AA-lib demo"; 20 24 license = licenses.gpl2; 21 25 maintainers = [ maintainers.rnhmjoj ]; 22 - platforms = platforms.linux; 26 + platforms = platforms.unix; 23 27 }; 24 28 }