Skip to content

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

Open
@i-am-logger

Description

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;
  };

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions