Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bazel_7: remove FHS wrapper for Linux, seems to not be needed #355451

Closed
wants to merge 5 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions pkgs/development/tools/build-managers/bazel/bazel_7/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
writeShellApplication,
makeBinaryWrapper,
autoPatchelfHook,
buildFHSEnv,
# this package (through the fixpoint glass)
# TODO probably still need for tests at some point
bazel_self,
Expand Down Expand Up @@ -157,19 +156,13 @@ let
meta.sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};

bazelFhs = buildFHSEnv {
name = "bazel";
targetPkgs = _: [ bazelBootstrap ];
runScript = "bazel";
};

# A FOD that vendors the Bazel dependencies using Bazel's new vendor mode.
# See https://bazel.build/versions/7.3.0/external/vendor for details.
# Note that it may be possible to vendor less than the full set of deps in
# the future, as this is approximately 16GB.
bazelDeps =
let
bazelForDeps = if stdenv.hostPlatform.isDarwin then bazelBootstrap else bazelFhs;
bazelForDeps = bazelBootstrap;
in
stdenv.mkDerivation {
name = "bazelDeps";
Expand Down Expand Up @@ -204,8 +197,8 @@ let
buildPhase = ''
runHook preBuild
export HOME=$(mktemp -d)
(cd bazel_src; ${bazelForDeps}/bin/bazel --server_javabase=${runJdk} mod deps --curses=no;
${bazelForDeps}/bin/bazel --server_javabase=${runJdk} vendor src:bazel_nojdk \
(cd bazel_src; ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} mod deps --curses=no;
${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} vendor src:bazel_nojdk \
boltzmannrain marked this conversation as resolved.
Show resolved Hide resolved
--curses=no \
--vendor_dir ../vendor_dir \
--verbose_failures \
Expand Down Expand Up @@ -728,6 +721,6 @@ stdenv.mkDerivation rec {
# tests = callPackage ./tests.nix { inherit Foundation bazelDeps bazel_self; };

# For ease of debugging
inherit bazelDeps bazelFhs bazelBootstrap;
inherit bazelDeps bazelBootstrap;
};
}