Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 47 lines 1.1 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 testers, 6 bazel-watcher, 7 stdenv, 8}: 9 10buildGoModule rec { 11 pname = "bazel-watcher"; 12 version = "0.26.3"; 13 14 src = fetchFromGitHub { 15 owner = "bazelbuild"; 16 repo = "bazel-watcher"; 17 rev = "v${version}"; 18 hash = "sha256-Hefg6PZfmuGUCEuYNwpJOkwPqt87qd1GpEG+IutPhDo="; 19 }; 20 21 vendorHash = "sha256-H1Bqw5hbOLS4oJeQOdIXQ9c2H8jGtoW1J75BIkTNR9k="; 22 23 # The dependency github.com/fsnotify/fsevents requires CGO 24 env.CGO_ENABLED = if stdenv.hostPlatform.isDarwin then "1" else "0"; 25 ldflags = [ 26 "-s" 27 "-X main.Version=${version}" 28 ]; 29 30 subPackages = [ "cmd/ibazel" ]; 31 32 passthru = { 33 tests.version = testers.testVersion { 34 package = bazel-watcher; 35 command = "ibazel version"; 36 }; 37 }; 38 39 meta = with lib; { 40 homepage = "https://github.com/bazelbuild/bazel-watcher"; 41 description = "Tools for building Bazel targets when source files change"; 42 license = licenses.asl20; 43 maintainers = with maintainers; [ kalbasit ]; 44 mainProgram = "ibazel"; 45 platforms = platforms.all; 46 }; 47}