bazel-watcher: replace the sed commands with a patch
This commit is contained in:
parent
616e52e21b
commit
c273648a20
2 changed files with 20 additions and 6 deletions
|
@ -6,6 +6,9 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
patches = [ ./use-go-in-path.patch ];
|
||||||
|
in
|
||||||
buildBazelPackage rec {
|
buildBazelPackage rec {
|
||||||
name = "bazel-watcher-${version}";
|
name = "bazel-watcher-${version}";
|
||||||
version = "0.10.3";
|
version = "0.10.3";
|
||||||
|
@ -22,11 +25,10 @@ buildBazelPackage rec {
|
||||||
bazelTarget = "//ibazel";
|
bazelTarget = "//ibazel";
|
||||||
|
|
||||||
fetchAttrs = {
|
fetchAttrs = {
|
||||||
|
inherit patches;
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
|
||||||
# tell rules_go to use the Go binary found in the PATH
|
|
||||||
sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
|
@ -51,11 +53,10 @@ buildBazelPackage rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
buildAttrs = {
|
buildAttrs = {
|
||||||
|
inherit patches;
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
|
|
||||||
# tell rules_go to use the Go binary found in the PATH
|
|
||||||
sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
13
pkgs/development/tools/bazel-watcher/use-go-in-path.patch
Normal file
13
pkgs/development/tools/bazel-watcher/use-go-in-path.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/WORKSPACE b/WORKSPACE
|
||||||
|
index 51273b6..fcf9ffb 100644
|
||||||
|
--- a/WORKSPACE
|
||||||
|
+++ b/WORKSPACE
|
||||||
|
@@ -61,7 +61,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
|
||||||
|
|
||||||
|
go_rules_dependencies()
|
||||||
|
|
||||||
|
-go_register_toolchains()
|
||||||
|
+go_register_toolchains(go_version = "host")
|
||||||
|
|
||||||
|
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
|
||||||
|
|
Loading…
Reference in a new issue