fenix: let file = ./rust-toolchain.toml; sha256 = "3St/9/UKo/6lz2Kfq2VmlzHyufduALpiIKaaKX4Pq0g="; in { fromFile = { system }: fenix.packages.${system}.fromToolchainFile { inherit file sha256; }; fromTarget = { pkgs, buildPlatform, targetPlatform ? null }: let inherit ((pkgs.lib.importTOML file).toolchain) channel; toolchain = fenix.packages.${buildPlatform}; in if isNull targetPlatform then fenix.packages.${buildPlatform}.${channel}.toolchain else toolchain.combine [ toolchain.${channel}.rustc toolchain.${channel}.cargo toolchain.targets.${targetPlatform}.${channel}.rust-std ]; }