From ca9a19cc60285a403c30da90ab0d1f3c1942c3ef Mon Sep 17 00:00:00 2001 From: alba4k Date: Mon, 30 Dec 2024 18:39:32 +0100 Subject: [PATCH] fix macos ci --- Makefile | 10 +++------- nix/package.nix | 10 +++++++--- src/optdeps/libpci.c | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 32f35ef..6d2800f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: compile +.PHONY: all compile clean run debug deb install uninstall OS := $(shell uname -o 2> /dev/null) KERNEL := $(shell uname -s 2> /dev/null) @@ -9,8 +9,6 @@ CONFIGPATH := /etc/xdg INSTALLFLAGS := -Dm755 CONFIGFLAGS := -Dm644 -OS := $(shell uname -o 2> /dev/null) - ifeq ($(OS),Android) INSTALLPATH := $(PREFIX)/bin CONFIGPATH := $(PREFIX)/etc/xdg @@ -29,7 +27,7 @@ build: meson setup build clean: - meson setup build --wipe + rm -rf build compile: build meson compile -C build albafetch @@ -45,14 +43,12 @@ deb: compile cd debian; \ ./makedeb.sh -install: build/albafetch +install: compile mkdir -p $(INSTALLPATH) $(CONFIGPATH) install $(INSTALLFLAGS) build/albafetch $(INSTALLPATH)/albafetch - install $(CONFIGFLAGS) albafetch.conf $(CONFIGPATH)/albafetch.conf uninstall: rm $(INSTALLPATH)/albafetch - rm $(CONFIGPATH)/albafetch.conf diff --git a/nix/package.nix b/nix/package.nix index 6cc1e2e..cad9187 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -1,6 +1,7 @@ { lib, stdenv, + apple-sdk_12, meson, ninja, pciutils, @@ -35,9 +36,12 @@ stdenv.mkDerivation { src = self; - buildInputs = [ - sqlite - ] ++ lib.optional stdenv.hostPlatform.isLinux pciutils; + buildInputs = + [ + sqlite + ] + ++ lib.optional stdenv.hostPlatform.isDarwin apple-sdk_12 + ++ lib.optional stdenv.hostPlatform.isLinux pciutils; nativeBuildInputs = [ meson diff --git a/src/optdeps/libpci.c b/src/optdeps/libpci.c index fbbe5b3..0878849 100644 --- a/src/optdeps/libpci.c +++ b/src/optdeps/libpci.c @@ -46,6 +46,6 @@ void get_gpus(char **gpus) { pci_cleanup(pacc); // close everything #else - -#endif // GLIB_EXISTS +(void)gpus; +#endif // LIBPCI_EXISTS }