27 lines
761 B
Nix
27 lines
761 B
Nix
{
|
|
inputs.nixpkgs.url = "nixpkgs";
|
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
|
inputs.fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, flake-utils, fenix }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
fenix' = fenix.packages.${system};
|
|
nightly = fenix'.default;
|
|
stable = fenix'.stable;
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
packages = [ (fenix'.combine [
|
|
(stable.withComponents [
|
|
"cargo" "rustc" "rust-src" "rust-analyzer" "clippy"
|
|
])
|
|
nightly.rustfmt
|
|
]) pkgs.cargo-watch ];
|
|
};
|
|
});
|
|
}
|