aboutsummaryrefslogtreecommitdiff
path: root/nix/toolchain.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/toolchain.nix')
-rw-r--r--nix/toolchain.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nix/toolchain.nix b/nix/toolchain.nix
new file mode 100644
index 00000000..e8baa63a
--- /dev/null
+++ b/nix/toolchain.nix
@@ -0,0 +1,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
+ ]
+