tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
bazel-watcher: 0.17.0 -> 0.21.2
Uri Baghin
3 years ago
d8377f52
ea98d035
+27
-8
3 changed files
expand all
collapse all
unified
split
pkgs
development
tools
bazel-watcher
default.nix
fix-rules-go-3408.patch
use-go-in-path.patch
+7
-6
pkgs/development/tools/bazel-watcher/default.nix
···
10
10
let
11
11
patches = [
12
12
./use-go-in-path.patch
13
13
+
./fix-rules-go-3408.patch
13
14
];
14
15
15
16
# Patch the protoc alias so that it always builds from source.
···
29
30
in
30
31
buildBazelPackage rec {
31
32
pname = "bazel-watcher";
32
32
-
version = "0.17.0";
33
33
+
version = "0.21.2";
33
34
34
35
src = fetchFromGitHub {
35
36
owner = "bazelbuild";
36
37
repo = "bazel-watcher";
37
38
rev = "v${version}";
38
38
-
sha256 = "sha256-aK18Q2nYxYajk9f/EEmtV7YJ8cYqbamR7vh3BTgu53Q=";
39
39
+
sha256 = "sha256-wigrE9u1VuFnqLWyVJK3M7xsjyme2dDG6YTcD9whKnw=";
39
40
};
40
41
41
42
nativeBuildInputs = [ go git python3 ];
···
44
45
bazel = bazel_5;
45
46
bazelFlags = [ "--override_repository=rules_proto=${rulesProto}" ];
46
47
bazelBuildFlags = lib.optionals stdenv.cc.isClang [ "--cxxopt=-x" "--cxxopt=c++" "--host_cxxopt=-x" "--host_cxxopt=c++" ];
47
47
-
bazelTarget = "//ibazel";
48
48
+
bazelTarget = "//cmd/ibazel";
48
49
49
50
fetchConfigured = false; # we want to fetch all dependencies, regardless of the current system
50
51
fetchAttrs = {
···
81
82
rm -rf $bazelOut/external/com_google_protobuf
82
83
'';
83
84
84
84
-
sha256 = "sha256-tRtlwv38bExvtHaCbRUp1kLgxvZSNaYCpFG/wwrkFrk=";
85
85
+
sha256 = "sha256-le8IepS+IGVX45Gj1aicPjYOkuUA+VVUy/PEeKLNYss=";
85
86
};
86
87
87
88
buildAttrs = {
···
90
91
preBuild = ''
91
92
patchShebangs .
92
93
93
93
-
substituteInPlace ibazel/BUILD --replace '{STABLE_GIT_VERSION}' ${version}
94
94
+
substituteInPlace cmd/ibazel/BUILD.bazel --replace '{STABLE_GIT_VERSION}' ${version}
94
95
echo ${bazel_5.version} > .bazelversion
95
96
'';
96
97
97
98
installPhase = ''
98
98
-
install -Dm755 bazel-bin/ibazel/ibazel_/ibazel $out/bin/ibazel
99
99
+
install -Dm755 bazel-bin/cmd/ibazel/ibazel_/ibazel $out/bin/ibazel
99
100
'';
100
101
};
101
102
+18
pkgs/development/tools/bazel-watcher/fix-rules-go-3408.patch
···
1
1
+
diff --git a/WORKSPACE b/WORKSPACE
2
2
+
index 555ab93..9f3b8a0 100644
3
3
+
--- a/WORKSPACE
4
4
+
+++ b/WORKSPACE
5
5
+
@@ -46,10 +46,11 @@ rules_proto_toolchains()
6
6
+
# gazelle:repository go_repository name=com_github_bazelbuild_rules_go importpath=github.com/bazelbuild/rules_go
7
7
+
http_archive(
8
8
+
name = "io_bazel_rules_go",
9
9
+
- sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6",
10
10
+
+ sha256 = "7fd912837cc971b708037ab1d0d721b892c62dadbfdcfae5066e8e90d25876e9",
11
11
+
+ strip_prefix = "rules_go-8d309d5af15814b4096d80b60f80fa86128c43f2",
12
12
+
urls = [
13
13
+
- "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
14
14
+
- "https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip",
15
15
+
+ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/archive/8d309d5af15814b4096d80b60f80fa86128c43f2.zip",
16
16
+
+ "https://github.com/bazelbuild/rules_go/archive/8d309d5af15814b4096d80b60f80fa86128c43f2.zip",
17
17
+
],
18
18
+
)
+2
-2
pkgs/development/tools/bazel-watcher/use-go-in-path.patch
···
6
6
7
7
go_rules_dependencies()
8
8
9
9
-
-go_register_toolchains(version = "1.17.6")
9
9
+
-go_register_toolchains(version = "1.19.4")
10
10
+go_register_toolchains(go_version = "host")
11
11
12
12
-
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
12
12
+
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
13
13