matrix-brandy: add darwin support

This commit is contained in:
Raf Gemmail 2025-05-25 13:17:20 +12:00
parent 0e1d8e94b0
commit 0b4d19ccdd
2 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,13 @@
diff --git a/makefile b/makefile
index d89cee1..37c1ac5 100644
--- a/makefile
+++ b/makefile
@@ -13,7 +13,7 @@ CFLAGS = -O3 -fPIE $(shell sdl-config --cflags) -DUSE_SDL -DDEFAULT_IGNORE -Wall
LDFLAGS +=
-LIBS = -lm $(shell sdl-config --libs) -ldl -pthread -lrt -lX11
+LIBS = -lm $(shell sdl-config --libs) -ldl -pthread -lX11
SRCDIR = src

View file

@ -18,6 +18,13 @@ stdenv.mkDerivation rec {
hash = "sha256-sMgYgV4/vV1x5xSICXRpW6K8uCdVlJrS7iEg6XzQRo8=";
};
patches = lib.optionals stdenv.isDarwin [ ./no-lrt.patch ];
makeFlags = lib.optionals stdenv.isDarwin [
"CC=cc"
"LD=clang"
];
buildInputs = [
libX11
SDL
@ -35,7 +42,7 @@ stdenv.mkDerivation rec {
description = "Matrix Brandy BASIC VI for Linux, Windows, MacOSX";
mainProgram = "brandy";
license = licenses.gpl2Plus;
platforms = platforms.linux;
platforms = platforms.unix;
maintainers = with maintainers; [ fiq ];
};
}