2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, lib, fetchurl, darwin, aalib, ncurses, xorg, libmikmod }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bb";
|
|
|
|
version = "1.3rc1";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sourceforge/aa-project/bb/${version}/${pname}-${version}.tar.gz";
|
|
|
|
sha256 = "1i411glxh7g4pfg4gw826lpwngi89yrbmxac8jmnsfvrfb48hgbr";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
aalib ncurses libmikmod
|
|
|
|
xorg.libXau xorg.libXdmcp xorg.libX11
|
|
|
|
] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreAudio;
|
|
|
|
|
|
|
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
|
|
|
sed -i -e '/^#include <malloc.h>$/d' *.c
|
|
|
|
'';
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
# error: 'regparm' is not valid on this platform
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64)
|
2022-11-04 12:27:35 +00:00
|
|
|
"-D__STRICT_ANSI__";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "http://aa-project.sourceforge.net/bb";
|
|
|
|
description = "AA-lib demo";
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = [ maintainers.rnhmjoj ];
|
|
|
|
platforms = platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "bb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|