From b142c14d33cbf343574fd6d7d8056df53b695052 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 29 Dec 2023 21:39:04 +0100 Subject: ... --- overlays/libdscp/default.nix | 6 ++++-- overlays/libdscp/src/Makefile | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'overlays') diff --git a/overlays/libdscp/default.nix b/overlays/libdscp/default.nix index 9e82f20e..46b622e9 100644 --- a/overlays/libdscp/default.nix +++ b/overlays/libdscp/default.nix @@ -1,12 +1,14 @@ { final, prev, ... }: { - libdscp = prev.stdenv.mkDerivation { + libdscp = prev.stdenvNoCC.mkDerivation { pname = "libdscp"; version = "0.0.0"; src = ./src; - makeFlags = [ "PREFIX=$(out)" ]; + nativeBuildInputs = with final; [ gcc musl.dev ]; + + makeFlags = [ "PREFIX=$(out)" "CC=musl-gcc" ]; }; dscp = prev.writeShellApplication { diff --git a/overlays/libdscp/src/Makefile b/overlays/libdscp/src/Makefile index e76930d7..9b8baf22 100644 --- a/overlays/libdscp/src/Makefile +++ b/overlays/libdscp/src/Makefile @@ -8,9 +8,11 @@ all: libdscp libdscp: $(CC) \ + -static \ -o $@.so $@.c \ -D_GNU_SOURCE \ - -nostartfiles -shared + -nostartfiles -shared \ + -lc install: libdscp install -d $(DESTDIR)$(PREFIX)/lib/ install -m 644 libdscp.so $(DESTDIR)$(PREFIX)/lib/ -- cgit v1.2.3