oxalica / rust-overlay

Pure and reproducible nix overlay of binary distributed rust toolchains
MIT License
859 stars 50 forks source link

Nightly version from today? #146

Closed TornaxO7 closed 9 months ago

TornaxO7 commented 9 months ago

Hello! I've the following rust-toolchain.toml:

[toolchain]
channel = "nightly-2023-11-23"
components = ["rustc-codegen-cranelift"]

now if I do nix develop (my flake uses your overlay) then I'm getting the following error message:

       error: Nightly 2023-11-23 is not available

may I ask what I'm doing wrong?

oxalica commented 9 months ago

Cannot reproduce. I guess you're using the outdated revision. Please try to nix flake update your flake and ensure you are using the latest master branch of rust-overlay.

TornaxO7 commented 9 months ago

Ok, so I created a minimal example: flake.nix:

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    rust-overlay.url = "github:oxalica/rust-overlay";
  };

  outputs = { nixpkgs, rust-overlay, ... }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;

        overlays = [ rust-overlay.overlays.default ];
      };

      toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
    in
    {
      devShells.${system}.default = pkgs.mkShell {
        packages = [ toolchain ];
      };
    };
}

rust-toolchain.toml:

[toolchain]
channel = "nightly-2023-11-23"
components = ["rustc-codegen-cranelift"]

and now I don't get this error :thinking: Welp. I'm sorry for the false report.