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
|
|
|
|
{
|
|
|
|
fromFile = { system }: fenix.packages.${system}.fromToolchainFile {
|
|
|
|
inherit file sha256;
|
|
|
|
};
|
|
|
|
|
2024-04-16 19:26:00 +00:00
|
|
|
fromTarget = { pkgs, buildPlatform, targetPlatform }:
|
2023-05-01 14:13:31 +00:00
|
|
|
let
|
2024-04-16 19:26:00 +00:00
|
|
|
name = (pkgs.lib.importTOML file).toolchain.channel;
|
|
|
|
fenixPackage = fenix.packages.${buildPlatform};
|
|
|
|
toolchain = fenixPackage.fromToolchainName { inherit name sha256; };
|
|
|
|
targetToolchain = fenixPackage.targets.${targetPlatform}.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
|
|
|
}
|