From 13f67336b4ed769cab717993bafe7bd4a220598e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliv=C3=A9r=20Falvai?= Date: Thu, 31 Oct 2024 18:45:20 +0100 Subject: [PATCH] bazel-watcher: fix darwin build https://hydra.nixos.org/build/274346443/log/tail --- pkgs/development/tools/bazel-watcher/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/bazel-watcher/default.nix b/pkgs/development/tools/bazel-watcher/default.nix index f8300db3c064f..eb875a4bb220e 100644 --- a/pkgs/development/tools/bazel-watcher/default.nix +++ b/pkgs/development/tools/bazel-watcher/default.nix @@ -4,6 +4,7 @@ buildGoModule, testers, bazel-watcher, + stdenv, }: buildGoModule rec { @@ -19,7 +20,8 @@ buildGoModule rec { vendorHash = "sha256-0I/bvuyosN55oNSMuom4C8rVjxneUaqV19l9OMiwWhU="; - CGO_ENABLED = "0"; + # The dependency github.com/fsnotify/fsevents requires CGO + CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0"; ldflags = [ "-s" "-X main.Version=${version}" @@ -28,7 +30,10 @@ buildGoModule rec { subPackages = [ "cmd/ibazel" ]; passthru = { - tests.version = testers.testVersion { package = bazel-watcher; }; + tests.version = testers.testVersion { + package = bazel-watcher; + command = "ibazel version"; + }; }; meta = with lib; {