diff options
author | Uri Baghin <uri@canva.com> | 2022-06-25 14:37:25 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-25 14:37:25 +1000 |
commit | 7e1209a5274e586efc1e1cd5fd87b9bd02024fde (patch) | |
tree | 24483bac390410501494ac6920ba4b94d7932f66 /pkgs | |
parent | 759472acef3627e535dbc950ae26a5604249496b (diff) | |
parent | c6909daf0e014994c4cb2dd48e2cfc6772249385 (diff) |
Merge pull request #177507 from ylecornec/ylecornec/bazel_dependencies_path
Bazel runtime dependencies in PATH
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_4/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/tools/build-managers/bazel/bazel_5/default.nix | 16 |
2 files changed, 16 insertions, 15 deletions
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix index 56a4d5b3b5a0c..aa9794b5869c0 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix @@ -257,7 +257,7 @@ stdenv.mkDerivation rec { runLocal = name: attrs: script: let attrs' = removeAttrs attrs [ "buildInputs" ]; - buildInputs = [ python3 which ] ++ (attrs.buildInputs or []); + buildInputs = attrs.buildInputs or []; in runCommandCC name ({ inherit buildInputs; @@ -323,13 +323,13 @@ stdenv.mkDerivation rec { in (if !stdenv.hostPlatform.isDarwin then { # `extracted` doesn’t work on darwin - shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; }; + shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; bazel = bazel_self; }; } else {}) // { - bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; }; - cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; - java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; - protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; }; - pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; }; + bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self; }; + cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazel_self; }; + java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazel_self; }; + protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self; }; + pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self; }; bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; @@ -591,6 +591,7 @@ stdenv.mkDerivation rec { # The binary _must_ exist with this naming if your project contains a .bazelversion # file. cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + wrapProgram $out/bin/bazel $wrapperfile --suffix PATH : ${defaultShellPath} mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch} mkdir $out/share diff --git a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix index d0b71f3760c89..c9c435a0b34d7 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_5/default.nix @@ -219,7 +219,7 @@ stdenv.mkDerivation rec { runLocal = name: attrs: script: let attrs' = removeAttrs attrs [ "buildInputs" ]; - buildInputs = [ python3 which ] ++ (attrs.buildInputs or []); + buildInputs = attrs.buildInputs or []; in runCommandCC name ({ inherit buildInputs; @@ -285,13 +285,13 @@ stdenv.mkDerivation rec { in (if !stdenv.hostPlatform.isDarwin then { # `extracted` doesn’t work on darwin - shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; }; + shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; bazel = bazel_self;}; } else {}) // { - bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; }; - cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; - java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; }; - protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; }; - pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; }; + bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self;}; + cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazel_self;}; + java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazel_self;}; + protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self; }; + pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazel_self;}; bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; }; @@ -586,6 +586,7 @@ stdenv.mkDerivation rec { # The binary _must_ exist with this naming if your project contains a .bazelversion # file. cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel + wrapProgram $out/bin/bazel $wrapperfile --suffix PATH : ${defaultShellPath} mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch} mkdir $out/share @@ -662,4 +663,3 @@ stdenv.mkDerivation rec { dontStrip = true; dontPatchELF = true; } - |