Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have rust.toolchain respect rust-toolchain.toml #1707

Open
i-am-logger opened this issue Feb 9, 2025 · 0 comments
Open

have rust.toolchain respect rust-toolchain.toml #1707

i-am-logger opened this issue Feb 9, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@i-am-logger
Copy link

i-am-logger commented Feb 9, 2025

as an example this is how i use it with naersk

rust-toolchain.toml

[toolchain]
channel = "nightly"
components = [ "rustc", "cargo", "rust-src" ]
profile = "minimal"

flake.nix

nixpkgs-mozilla = {
    url = "github:mozilla/nixpkgs-mozilla";
    flake = false;
};

// ... 
pkgs = (import nixpkgs) {
    inherit system;
    overlays = [ (import nixpkgs-mozilla) ];
};

toolchain = (pkgs.rustChannelOf {
    rustToolchain = ./rust-toolchain.toml;
    sha256 = "sha256-vFu6RmeJsrTgIjNjNJrC+pVZh1fgr0wm7VX24RJQ14k=";
}).rust;

package.nix

  naersk' = pkgs.callPackage naersk {
    cargo = toolchain;
    rustc = toolchain;
  };
@i-am-logger i-am-logger added the enhancement New feature or request label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant