Remove toolchain.toml dependency

This commit is contained in:
GHOSCHT 2023-10-09 18:34:43 +02:00
parent 606c40f6bd
commit 9934410fd2
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View file

@ -1,4 +1,3 @@
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -8,15 +7,20 @@
outputs = { self, nixpkgs, rust-overlay, }:
let
system = "x86_64-linux";
rustVersion = "1.62.0";
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src" # for rust-analyzer
];
};
pkgs = import nixpkgs {
inherit system;
overlays = [ rust-overlay.overlays.default ];
};
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./toolchain.toml;
in {
devShells.${system}.default = pkgs.mkShell {
packages = [ toolchain pkgs.rust-analyzer-unwrapped ];
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
buildInputs = [ rust ] ++ (with pkgs; [ rust-analyzer pkg-config ]);
RUST_BACKTRACE = 1;
};
};
}

View file

@ -1,4 +0,0 @@
[toolchain]
channel = "nightly"
components = [ "rustfmt", "rust-src", "rust-src" ]
profile = "minimal"