mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 21:37:55 +08:00
23 lines
589 B
Nix
23 lines
589 B
Nix
{ lib, fenix }:
|
|
|
|
let
|
|
file = ./rust-toolchain.toml;
|
|
sha256 = "yMuSb5eQPO/bHv+Bcf/US8LVMbf/G/0MSfiPwBhiPpk=";
|
|
in
|
|
|
|
{
|
|
fromFile = fenix.fromToolchainFile { inherit file sha256; };
|
|
|
|
fromTarget = target:
|
|
let
|
|
name = (lib.importTOML file).toolchain.channel;
|
|
specs = { inherit name sha256; };
|
|
toolchain = fenix.fromToolchainName specs;
|
|
crossToolchain = fenix.targets.${target}.fromToolchainName specs;
|
|
components = [ toolchain.rustc toolchain.cargo ]
|
|
++ lib.optional (!isNull target) crossToolchain.rust-std;
|
|
in
|
|
|
|
fenix.combine components;
|
|
}
|