gotop: fix build on Darwin

It failed with

    error: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_]
This commit is contained in:
Robert Schütz 2023-03-11 18:48:24 -08:00
parent 613f53a17a
commit 690e76e063

View file

@ -27,6 +27,9 @@ buildGoModule rec {
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
# prevent `error: 'TARGET_OS_MAC' is not defined`
env.CGO_CFLAGS = "-Wno-undef-prefix";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ IOKit ];