feat: nightly toolchain

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
This commit is contained in:
Christina Sørensen 2024-05-14 15:57:31 +02:00
parent 389e8340e6
commit 1f6fe32adc
Signed by: cafkafk
GPG key ID: 26C542FD97F965CE
2 changed files with 20 additions and 3 deletions

View file

@ -42,12 +42,18 @@
}: }:
flake-utils.lib.eachDefaultSystem ( flake-utils.lib.eachDefaultSystem (
system: let system: let
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
inherit (pkgs) lib;
overlays = [(import rust-overlay)]; overlays = [(import rust-overlay)];
craneLib = crane.lib.${system}; pkgs = (import nixpkgs) {
inherit system overlays;
};
inherit system;
inherit (pkgs) lib;
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLib = (crane.mkLib pkgs).overrideToolchain toolchain;
src = craneLib.cleanCargoSource (craneLib.path ./.); src = craneLib.cleanCargoSource (craneLib.path ./.);
# Common arguments can be set here to avoid repeating them later # Common arguments can be set here to avoid repeating them later

11
rust-toolchain.toml Normal file
View file

@ -0,0 +1,11 @@
[toolchain]
channel = "nightly"
components = [
"rustfmt",
"rustc",
"rust-src",
"rust-analyzer",
"cargo",
"clippy",
]
profile = "minimal"