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 = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
@ -8,15 +7,20 @@
|
||||||
outputs = { self, nixpkgs, rust-overlay, }:
|
outputs = { self, nixpkgs, rust-overlay, }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
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 {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
overlays = [ rust-overlay.overlays.default ];
|
||||||
};
|
};
|
||||||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./toolchain.toml;
|
|
||||||
in {
|
in {
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
packages = [ toolchain pkgs.rust-analyzer-unwrapped ];
|
buildInputs = [ rust ] ++ (with pkgs; [ rust-analyzer pkg-config ]);
|
||||||
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
RUST_BACKTRACE = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
[toolchain]
|
|
||||||
channel = "nightly"
|
|
||||||
components = [ "rustfmt", "rust-src", "rust-src" ]
|
|
||||||
profile = "minimal"
|
|
Loading…
Reference in a new issue