Skip to content

Commit

Permalink
bazel-watcher: fix darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
ofalvai authored and wegank committed Nov 2, 2024
1 parent a84cba7 commit 13f6733
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 13f6733

Please sign in to comment.