tools/run_bazel: allow running bazel inside nix-shell without entering
nix-shell does not support arguments for an application running inside
a FHS environment. This adds a workaround by keeping the command inside
an environment variable and executing it if set. If it doesnt exist, we
fall back to our bash shell.
Change-Id: I7fd53f9c14019179490af4b9af3b0b16b3d70297
Reviewed-on: https://review.monogon.dev/c/monogon/+/2066
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/tools/run_bazel b/tools/run_bazel
new file mode 100755
index 0000000..c2a9adc
--- /dev/null
+++ b/tools/run_bazel
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+export COMMAND="bazel $*"
+nix-shell