28 lines
776 B
Nix
28 lines
776 B
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs";
|
|
utils.url = "github:numtide/flake-utils";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
};
|
|
|
|
outputs = { self, nixpkgs, utils, rust-overlay }:
|
|
utils.lib.eachDefaultSystem (system:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = (import nixpkgs) {
|
|
inherit system overlays;
|
|
};
|
|
in {
|
|
devShell = with pkgs; mkShell {
|
|
nativeBuildInputs = [
|
|
# This sets up the rust suite, automatically selecting the latest nightly version
|
|
(rust-bin.selectLatestNightlyWith
|
|
(toolchain: toolchain.default.override {
|
|
extensions = [ "rust-src" "clippy" "rust-analyzer" ];
|
|
}))
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|