From a61dbe68b0b0ed62cdc38d8d523c8d9c3f78a441 Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 12 Nov 2024 16:05:35 +0100 Subject: [PATCH 1/5] bazel_7: remove FHS wrapper for Linux, seems to not be needed --- .../tools/build-managers/bazel/bazel_7/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index 149f6bcd533d7..59a25f4810dc3 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -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, @@ -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"; @@ -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; }; } From 3de2f59f9ecbfc59e8db320ff1f8aba1977f53ef Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 12 Nov 2024 17:14:17 +0100 Subject: [PATCH 2/5] Update default.nix --- .../tools/build-managers/bazel/bazel_7/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index 59a25f4810dc3..2502d351cf7cb 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -197,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 \ --curses=no \ --vendor_dir ../vendor_dir \ --verbose_failures \ From 80a1a2e24d5b8259cfa329f1dde88e58b4641122 Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 12 Nov 2024 18:16:59 +0100 Subject: [PATCH 3/5] Update pkgs/development/tools/build-managers/bazel/bazel_7/default.nix --- .../tools/build-managers/bazel/bazel_7/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index 2502d351cf7cb..2c13460dc5e64 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -197,8 +197,8 @@ let buildPhase = '' runHook preBuild export HOME=$(mktemp -d) - (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 \ + (cd bazel_src; ${bazelForDeps}/bin/bazel --batch --toolchain_resolution_debug --server_javabase=${runJdk} mod deps --curses=no; + ${bazelForDeps}/bin/bazel --batch --toolchain_resolution_debug --server_javabase=${runJdk} vendor src:bazel_nojdk \ --curses=no \ --vendor_dir ../vendor_dir \ --verbose_failures \ From 11fbc2817abf17036afffe4e365f4f587b6a54e8 Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 12 Nov 2024 18:33:27 +0100 Subject: [PATCH 4/5] Update pkgs/development/tools/build-managers/bazel/bazel_7/default.nix --- .../tools/build-managers/bazel/bazel_7/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index 2c13460dc5e64..a9f23b9ab247e 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -197,8 +197,8 @@ let buildPhase = '' runHook preBuild export HOME=$(mktemp -d) - (cd bazel_src; ${bazelForDeps}/bin/bazel --batch --toolchain_resolution_debug --server_javabase=${runJdk} mod deps --curses=no; - ${bazelForDeps}/bin/bazel --batch --toolchain_resolution_debug --server_javabase=${runJdk} vendor src:bazel_nojdk \ + (cd bazel_src; ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} mod deps --curses=no --toolchain_resolution_debug; + ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} vendor --toolchain_resolution_debug src:bazel_nojdk \ --curses=no \ --vendor_dir ../vendor_dir \ --verbose_failures \ From 33125979f6b90120d277bef8af92829962018de4 Mon Sep 17 00:00:00 2001 From: Dmitry Ivankov Date: Tue, 12 Nov 2024 18:43:08 +0100 Subject: [PATCH 5/5] Update pkgs/development/tools/build-managers/bazel/bazel_7/default.nix --- pkgs/development/tools/build-managers/bazel/bazel_7/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix index a9f23b9ab247e..453f2ae94c499 100644 --- a/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix +++ b/pkgs/development/tools/build-managers/bazel/bazel_7/default.nix @@ -197,7 +197,7 @@ let buildPhase = '' runHook preBuild export HOME=$(mktemp -d) - (cd bazel_src; ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} mod deps --curses=no --toolchain_resolution_debug; + (cd bazel_src; ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} mod deps --curses=no; ${bazelForDeps}/bin/bazel --batch --server_javabase=${runJdk} vendor --toolchain_resolution_debug src:bazel_nojdk \ --curses=no \ --vendor_dir ../vendor_dir \