From 7e6d5f007c72ad60b1a797e842a1154f58634e11 Mon Sep 17 00:00:00 2001 From: anand Date: Mon, 6 Apr 2026 22:33:59 +0530 Subject: loops --- flake.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..0d94ad0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + description = "Rust development"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + devShells.x86_64-linux.default = pkgs.mkShell { + packages = with pkgs; [ + gcc + bashInteractive + rustc + clippy + cargo + rustfmt + rust-analyzer + ]; + + shellHook = '' + export SHELL=${pkgs.bashInteractive}/bin/bash + export NIX_SHELL_NAME="Rust development" + if [[ -n "$PS1" ]]; then + PS1="\[\e[38;5;45m\][nix:$NIX_SHELL_NAME]\[\e[0m\] $PS1" + fi + ''; + }; + }; +} -- cgit v1.2.3