flake.nix 591 B

12345678910111213141516171819202122232425
  1. {
  2. inputs = {
  3. nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
  4. flake-utils.url = "github:numtide/flake-utils";
  5. };
  6. outputs = { self, nixpkgs, flake-utils, ... }:
  7. flake-utils.lib.eachDefaultSystem (system:
  8. let
  9. pkgs = import nixpkgs { inherit system; };
  10. in
  11. {
  12. devShell = pkgs.mkShell {
  13. packages = with pkgs; [
  14. cargo
  15. cargo-watch
  16. rustc
  17. rustfmt
  18. clippy
  19. rust-analyzer
  20. ];
  21. RUST_SRC_PATH = pkgs.rustPlatform.rustLibSrc;
  22. };
  23. });
  24. }