bootstrap-toolchain/system.nix

22 lines
520 B
Nix

{ pkgs, currentSystem }:
let
parsedSystem = builtins.split "-" currentSystem;
arch = builtins.head (parsedSystem);
os = builtins.elemAt (parsedSystem) 2;
system = pkgs.lib.systems.elaborate {
system = currentSystem;
config = "${arch}-unknown-linux-musl";
isStatic = true;
useLLVM = true;
linker = "lld";
};
args = if os != "linux" then {}
else {
localSystem = system;
crossSystem = system;
};
in args