From f0c230f38579f04191c3a5b4b9d56a70876cfb00 Mon Sep 17 00:00:00 2001 From: Jakub Trzeciak Date: Sat, 10 Feb 2024 20:56:31 +0100 Subject: add flake dev env --- flake.nix | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9a709aa --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + description = "A Rust project with LSP"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }@inputs: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + rustc + cargo + rust-analyzer + ]; + + shellHook = '' + echo "Rust and Rust Analyzer are ready!" + ''; + }; + }); +} -- cgit v1.2.3