garage/nix/toolchain.nix

32 lines
818 B
Nix
Raw Normal View History

{ system ? builtins.currentSystem, }:
2021-10-28 08:04:14 +00:00
with import ./common.nix;
let
platforms = [
#"x86_64-unknown-linux-musl"
2021-10-28 08:04:14 +00:00
"i686-unknown-linux-musl"
#"aarch64-unknown-linux-musl"
2021-10-28 08:04:14 +00:00
"armv6l-unknown-linux-musleabihf"
];
pkgsList = builtins.map (target:
import pkgsSrc {
inherit system;
crossSystem = {
config = target;
isStatic = true;
};
overlays = [ cargo2nixOverlay ];
}) platforms;
pkgsHost = import pkgsSrc { };
2021-10-28 08:04:14 +00:00
lib = pkgsHost.lib;
kaniko = (import ./kaniko.nix) pkgsHost;
2022-03-03 12:34:20 +00:00
winscp = (import ./winscp.nix) pkgsHost;
manifestTool = (import ./manifest-tool.nix) pkgsHost;
in lib.flatten (builtins.map (pkgs: [
pkgs.rustPlatform.rust.rustc
pkgs.rustPlatform.rust.cargo
pkgs.buildPackages.stdenv.cc
]) pkgsList) ++ [ kaniko winscp manifestTool ]
2021-10-28 08:04:14 +00:00