From e23bfcfb36ec3279dade992c226d344b8ba4bd64 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 5 Nov 2026 13:51:07 -0800 Subject: [PATCH] build(nix): the macOS options and nix-darwin module validations are checks on every system They take a plain pkgs and evaluate against any nixpkgs, so a Linux runner can build them. They stay in the macos-options set. --- nix/macos/flake-module.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/nix/macos/flake-module.nix b/nix/macos/flake-module.nix index 2dbc6d70..48cddb01 100644 --- a/nix/macos/flake-module.nix +++ b/nix/macos/flake-module.nix @@ -13,6 +13,21 @@ let inherit (lib') mkPkgs; in { + # the options and the nix-darwin module are plain Nix: they take a plain `pkgs` and are evaluated on + # every system, so that a Linux runner can check them (the ci workflow does) + imports = [ + { + perSystem = + { pkgs, ... }: + { + allChecks = { + macos-nix-options-validation = import ./tests { inherit pkgs; }; + macos-darwin-module-validation = import ./tests/darwin-module.nix { inherit pkgs; }; + }; + }; + } + ]; + perSystem = { pkgs, system, ... }: let @@ -57,10 +72,6 @@ in ); macos-nextest = build.craneLib.cargoNextest (build.individualCrateArgs // { doCheck = true; }); - - macos-nix-options-validation = import ./tests { inherit pkgs; }; - - macos-darwin-module-validation = import ./tests/darwin-module.nix { inherit pkgs; }; }; packages = {