From 56afe5b286f6e9c204e911ee5bb4abb5b4f058e8 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Thu, 5 Nov 2026 14:06:08 -0800 Subject: [PATCH] build(nix): the tests of komorebi-macos-core run in linux-nextest and macos-nextest --- nix/linux/flake-module.nix | 2 ++ nix/macos/build.nix | 2 +- nix/workspace-src.nix | 8 +++++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nix/linux/flake-module.nix b/nix/linux/flake-module.nix index f08b5323..6aca810d 100644 --- a/nix/linux/flake-module.nix +++ b/nix/linux/flake-module.nix @@ -147,6 +147,8 @@ in "komorebi-layouts" "komorebi-scrolling" "komorebi-themes" + # the part of the macOS daemon that needs no macOS (nix/workspace-src.nix: linuxNeutralTests) + "komorebi-macos-core" "komorebi-backend" "komorebi-collections" "komorebi-config" diff --git a/nix/macos/build.nix b/nix/macos/build.nix index 3440b266..58287da3 100644 --- a/nix/macos/build.nix +++ b/nix/macos/build.nix @@ -26,7 +26,7 @@ in lockFile = lib'.repoFile "Cargo.lock"; tomlFile = lib'.repoFile "Cargo.toml"; - packages = "-p komorebi -p komorebi-macos -p komorebic -p komorebi-client -p komorebi-bar"; + packages = "-p komorebi -p komorebi-macos -p komorebi-macos-core -p komorebic -p komorebi-client -p komorebi-bar"; workspaceArgs = { pname = "komorebi-workspace-macos"; inherit version; diff --git a/nix/workspace-src.nix b/nix/workspace-src.nix index 8debab41..8d11b7ea 100644 --- a/nix/workspace-src.nix +++ b/nix/workspace-src.nix @@ -48,6 +48,12 @@ let "crates/komorebi-hotkeys" ]; macosOnly = [ "crates/komorebi-macos" ]; + + # crates that no Linux package depends on, but whose tests need no macOS and so run in `linux-nextest`: + # the FFI-free part of the macOS daemon. They are not in linux/root-crates.json (that list is the + # `cargo tree` of the Linux packages, which tools/kde-closure-check keeps equal), only members of the + # Linux source. + linuxNeutralTests = [ "crates/komorebi-macos-core" ]; windowsOnly = [ "crates/komorebi-windows" "crates/komorebi-e2e-agent" @@ -77,7 +83,7 @@ let nixgen = toolOnly; # everything but the other two platforms' crates and the tool windows = builtins.filter (m: !(builtins.elem m (linuxOnly ++ macosOnly ++ toolOnly))) allMembers; - linux = linuxOnly ++ linuxShared; + linux = linuxOnly ++ linuxShared ++ linuxNeutralTests; # everything but the Windows and Linux crates, the tool and the recorder macos = builtins.filter ( m: !(builtins.elem m (windowsOnly ++ linuxOnly ++ toolOnly ++ [ "komorebi-recorder" ]))