Skip to content

Commit

Permalink
Introduce bazel_ot package
Browse files Browse the repository at this point in the history
This is bazelisk with auto completion stolen from bazel package.
  • Loading branch information
nbdd0121 committed Jan 3, 2024
1 parent b51a04d commit c6306a0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions pkgs/bazel_ot/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
runCommand,
bazelisk,
bazel_6,
...
}:
# OpenTitan requires a specific version of Bazel.
# We *could* package our own Bazel, but it can't be a simple override since Bazel build process
# require a lot of Internet dependencies.
#
# For simplicity we'll just let bazelisk do the heavyloading.
#
# This package basically just creates an alias from bazel to bazelisk and adds the auto completion
# which is absent in bazelisk.
runCommand "bazel" {} ''
cp -r ${bazelisk} $out
chmod -R +w $out
ln -s $out/bin/bazelisk $out/bin/bazel
cp -r ${bazel_6}/share $out/share
''
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{
verilator_ot = import ./verilator {inherit pkgs;};
python_ot = pkgs.callPackage ./python_ot {inherit inputs;};
bazel_ot = pkgs.callPackage ./bazel_ot {};
}
// pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") {
lowrisc-toolchain-gcc-rv32imcb = pkgs.callPackage ./lowrisc-toolchain-gcc-rv32imcb.nix {};
Expand Down

0 comments on commit c6306a0

Please sign in to comment.