From b113be5f13b661d7165e2bdcb61a93f06d884b30 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Tue, 5 May 2026 16:01:56 +0200 Subject: [PATCH] flake: provide devshells for static cross systems too Change-Id: I27ec97eaac88236a0958953a81d09ee16a6a6964 --- flake.nix | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index e48157d9b..9ca9b7d6d 100644 --- a/flake.nix +++ b/flake.nix @@ -611,12 +611,30 @@ in (makeShells "native" nixpkgsFor.${system}.native) // (makeShells "static" nixpkgsFor.${system}.static) - // (forAllCrossSystems ( - crossSystem: - let - pkgs = nixpkgsFor.${system}.cross.${crossSystem}; - in - makeShell pkgs pkgs.clangStdenv + // (lib.listToAttrs ( + # Provide e.g., both '.#native-aarch64-linux` and `.#static-aarch64-linux`, + # for each cross-system. + # "native" feels like a misnomer here since it's literally cross compiling, + # but at least it's consistent with the native/static dichotomy we've set up. + lib.concatMap ( + crossSystem: + let + pkgs = nixpkgsFor.${system}.cross.${crossSystem}; + inherit (pkgs) pkgsStatic; + native = makeShell pkgs pkgs.clangStdenv; + static = makeShell pkgsStatic pkgsStatic.clangStdenv; + in + [ + { + name = "native-${crossSystem}"; + value = native; + } + { + name = "static-${crossSystem}"; + value = static; + } + ] + ) crossSystems )) // { default = self.devShells.${system}.native-clangStdenvPackages;