devenv icon indicating copy to clipboard operation
devenv copied to clipboard

have rust.toolchain respect rust-toolchain.toml

Open i-am-logger opened this issue 1 year ago • 0 comments

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 avatar Feb 09 '25 09:02 i-am-logger