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

Add fromToolchainName to targets #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

soywod
Copy link

@soywod soywod commented Apr 14, 2024

This would allow combining components from a specific version in a cross compilation context:

[toolchain]
channel = "1.77.0"
profile = "default"
components = [ "rust-src", "rust-analyzer" ]
let
  name = (pkgs.lib.importTOML ./rust-toolchain.toml).toolchain.channel;
  fenixPackage = fenix.packages.${buildPlatform};
  toolchain = fenixPackage.fromToolchainName { inherit name sha256; };
  targetToolchain = fenixPackage.targets.${targetPlatform}.fromToolchainName { inherit name sha256; };
in
fenixPackage.combine [
  toolchain.rustc
  toolchain.cargo
  targetToolchain.rust-std
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant