summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 9a709aa23dd5cb56e96a0edbb56e4ab7c84d25bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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!"
          '';
        };
      });
}
Software created with 💖