From 489dcfacd7abfcc840e5f8aca0b6182c0a178bae Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sun, 7 Jul 2024 21:12:37 +0000 Subject: [PATCH] flake: add rust devshell --- flake.nix | 5 +++++ rust/.envrc | 1 + 2 files changed, 6 insertions(+) create mode 100644 rust/.envrc diff --git a/flake.nix b/flake.nix index 700413a..1519b6f 100644 --- a/flake.nix +++ b/flake.nix @@ -82,6 +82,11 @@ ]; RUST_SRC_PATH = "${rust}/lib/rustlib/src/rust/library"; }; + devShells.rust = with pkgs; + mkShell { + nativeBuildInputs = [ rustc cargo rustfmt clippy ]; + RUST_SRC_PATH = "${rust.packages.stable.rustPlatform.rustLibSrc}"; + }; devShells.avr = with pkgs; pkgsCross.avr.mkShell { packages = [ avrdude gnumake ]; diff --git a/rust/.envrc b/rust/.envrc new file mode 100644 index 0000000..0da16e8 --- /dev/null +++ b/rust/.envrc @@ -0,0 +1 @@ +use flake ..#rust