Merge pull request #220765 from dotlambda/gotop-darwin

gotop: fix build on Darwin
This commit is contained in:
Weijia Wang 2023-04-13 11:19:59 +03:00 committed by GitHub
commit 693bc82c4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 ];