How to install bazel for nix develop shell in nixos? any instructions?

nix develop .#build
Welcome to devshell!
[deveshell] $bazel
bazel: command not found

There’s not quite enough context in your post to know what your trying to do or why’s going wrong for you. This works for me:

❯ cat flake.nix
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    flake-utils.url = "github:numtide/flake-utils";

  outputs = {
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
      devShells.default = with pkgs; mkShell {
        packages = [
❯ git add flake.nix
❯ nix develop
[matt@vorpal:~/2023/08/23]$ bazel
Usage: bazel <command> <options> ...

I’m not a bazel user myself, but I have to assume that if your project needs it in the devshell then you might also want a packages attribute in outptut which invokes bazel when you run nix build.

A bit of grepping nixpkgs turns up this as a possible example.

buildBazelPackage is defined here.

Thanks Matt! Yes, that works!