nix/examples/shell/shell.nix
2025-10-27 16:33:21 +08:00

16 lines
314 B
Nix

{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [
bash
# Other tools
#git
];
# Commands to run immediately when entering the shell (optional)
shellHook = ''
echo "Welcome to the bash shell!"
echo "Bash version: $(bash --version)"
'';
}
# Run with: nix-shell