Merge pull request #177507 from ylecornec/ylecornec/bazel_dependencies_path
Bazel runtime dependencies in PATH
This commit is contained in:
commit
7e1209a527
2 changed files with 16 additions and 15 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue