Skip to content

Commit

Permalink
bazel-watcher: fix darwin build (#352672)
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored Nov 3, 2024
2 parents 9f813c8 + 13f6733 commit 19833ad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/tools/bazel-watcher/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
buildGoModule,
testers,
bazel-watcher,
stdenv,
}:

buildGoModule rec {
Expand All @@ -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}"
Expand All @@ -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; {
Expand Down

0 comments on commit 19833ad

Please sign in to comment.