2023-05-01 14:13:31 +00:00
|
|
|
fenix:
|
|
|
|
|
|
|
|
let
|
|
|
|
file = ./rust-toolchain.toml;
|
2024-04-16 19:26:00 +00:00
|
|
|
sha256 = "+syqAd2kX8KVa8/U2gz3blIQTTsYYt3U63xBWaGOSc8=";
|
2023-05-01 14:13:31 +00:00
|
|
|
in
|
|
|
|
{
|
2024-04-18 20:06:24 +00:00
|
|
|
fromFile = { buildSystem }: fenix.packages.${buildSystem}.fromToolchainFile {
|
2023-05-01 14:13:31 +00:00
|
|
|
inherit file sha256;
|
|
|
|
};
|
|
|
|
|
2024-04-18 20:06:24 +00:00
|
|
|
fromTarget = { pkgs, buildSystem, targetSystem }:
|
2023-05-01 14:13:31 +00:00
|
|
|
let
|
2024-04-16 19:26:00 +00:00
|
|
|
name = (pkgs.lib.importTOML file).toolchain.channel;
|
2024-04-18 20:06:24 +00:00
|
|
|
fenixPackage = fenix.packages.${buildSystem};
|
2024-04-16 19:26:00 +00:00
|
|
|
toolchain = fenixPackage.fromToolchainName { inherit name sha256; };
|
2024-04-18 20:06:24 +00:00
|
|
|
targetToolchain = fenixPackage.targets.${targetSystem}.fromToolchainName { inherit name sha256; };
|
2023-05-01 14:13:31 +00:00
|
|
|
in
|
2024-04-16 19:26:00 +00:00
|
|
|
fenixPackage.combine [
|
|
|
|
toolchain.rustc
|
|
|
|
toolchain.cargo
|
|
|
|
targetToolchain.rust-std
|
|
|
|
];
|
2023-05-01 14:13:31 +00:00
|
|
|
}
|