From a3455191be4b4930e24248debd6c7fc01864a435 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Sat, 21 Oct 2023 02:52:49 +0000 Subject: [PATCH] Set cpu environment variables for kaem in flake --- flake.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 0b56f208..955f3f24 100644 --- a/flake.nix +++ b/flake.nix @@ -7,7 +7,18 @@ outputs = { self, nixpkgs, utils }: let supportedSystems = [ "x86_64-linux" "i686-linux" "aarch64-linux" ]; in (utils.lib.eachSystem supportedSystems (system: - let pkgs = import nixpkgs { inherit system; }; + let + pkgs = import nixpkgs { inherit system; }; + stage0Arch = { + "aarch64-linux" = "aarch64"; + "i686-linux" = "x86"; + "x86_64-linux" = "amd64"; + }.${system} or (throw "Unsupported system: ${system}"); + mesArch = { + "aarch64-linux" = "aarch64"; + "i686-linux" = "x86"; + "x86_64-linux" = "x86_64"; + }.${system} or (throw "Unsupported system: ${system}"); in rec { formatter = pkgs.nixfmt; @@ -20,7 +31,9 @@ minimal-bootstrap.mescc-tools ]; - CC="M2-Planet"; + CC = "M2-Planet"; + stage0_cpu = stage0Arch; + mes_cpu = mesArch; }; devShells.default = devShells.rustybar; }));