aboutsummaryrefslogtreecommitdiff
path: root/nix/toolchain.nix
blob: e8baa63a88951f7255036da55fd6e888a6d9fc04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  system ? builtins.currentSystem,
}:

with import ./common.nix;

let
  platforms = [
    "x86_64-unknown-linux-musl"
    "i686-unknown-linux-musl"
    "aarch64-unknown-linux-musl"
    "armv6l-unknown-linux-musleabihf"
  ];
  pkgsList = builtins.map (target: import pkgsSrc { 
    inherit system; 
    crossSystem = { config = target; };
  }) platforms;
  pkgsHost = import pkgsSrc {};
  lib = pkgsHost.lib;
  kaniko = (import ./kaniko.nix) pkgsHost;
in 
  lib.flatten (builtins.map (pkgs: [
     pkgs.rustPlatform.rust.rustc
     pkgs.rustPlatform.rust.cargo
     pkgs.buildPackages.stdenv.cc
  ]) pkgsList) ++ [
    kaniko
  ]