depot/third_party/nixpkgs/pkgs/applications/misc/bb/default.nix
Default email 1be0098156 Project import generated by Copybara.
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
2022-11-04 13:27:35 +01:00

32 lines
975 B
Nix

{ 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
'';
# error: 'regparm' is not valid on this platform
NIX_CFLAGS_COMPILE = lib.optionalString (stdenv.isDarwin && stdenv.isAarch64)
"-D__STRICT_ANSI__";
meta = with lib; {
homepage = "http://aa-project.sourceforge.net/bb";
description = "AA-lib demo";
license = licenses.gpl2Plus;
maintainers = [ maintainers.rnhmjoj ];
platforms = platforms.unix;
};
}