Skip to content

Commit

Permalink
fix macos ci
Browse files Browse the repository at this point in the history
  • Loading branch information
alba4k committed Dec 30, 2024
1 parent fbbed48 commit ca9a19c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 3 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -29,7 +27,7 @@ build:
meson setup build

clean:
meson setup build --wipe
rm -rf build

compile: build
meson compile -C build albafetch
Expand All @@ -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
10 changes: 7 additions & 3 deletions nix/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
lib,
stdenv,
apple-sdk_12,
meson,
ninja,
pciutils,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/optdeps/libpci.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ void get_gpus(char **gpus) {

pci_cleanup(pacc); // close everything
#else

#endif // GLIB_EXISTS
(void)gpus;
#endif // LIBPCI_EXISTS
}

0 comments on commit ca9a19c

Please sign in to comment.