Remove toolchain.toml dependency
This commit is contained in:
parent
606c40f6bd
commit
9934410fd2
2 changed files with 8 additions and 8 deletions
12
flake.nix
12
flake.nix
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
||||
components = [ "rustfmt", "rust-src", "rust-src" ]
|
||||
profile = "minimal"
|
Loading…
Reference in a new issue