From 29457262bb00e6df48a6cc00b85beb0a98a473c3 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 30 Oct 2026 19:45:35 -0700 Subject: [PATCH] fix(kde): make vm-mac use git+file from a subdirectory of a bigger repository vm-mac pointed the flake at a repo root that is no longer the KDE directory. It now uses a git+file URL with ?dir=komorebi-for-kde. Verified by evaluation only; the VM was not run for this change. --- komorebi-for-kde/scripts/vm-mac | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/komorebi-for-kde/scripts/vm-mac b/komorebi-for-kde/scripts/vm-mac index 537fdb99..07d69988 100755 --- a/komorebi-for-kde/scripts/vm-mac +++ b/komorebi-for-kde/scripts/vm-mac @@ -17,8 +17,17 @@ name="${1:?usage: scripts/vm-mac NAME [driver arguments]}" shift builder="${KOMOREBI_BUILDER:?set KOMOREBI_BUILDER to the store URL of a Linux builder}" cd "$(dirname "$0")/.." -test="path:$PWD#legacyPackages.aarch64-darwin.vm.$name" -[ -d .git ] && test="git+file://$PWD#legacyPackages.aarch64-darwin.vm.$name" +attr="legacyPackages.aarch64-darwin.vm.$name" +test="path:$PWD#$attr" +# a git checkout is a flake source without its untracked files (.vm, target); this tree may be the +# komorebi-for-kde directory of a bigger repository, whose toplevel is not $PWD +if top=$(git rev-parse --show-toplevel 2> /dev/null); then + if [ "$top" = "$PWD" ]; then + test="git+file://$PWD#$attr" + else + test="git+file://$top?dir=${PWD#"$top"/}#$attr" + fi +fi echo "== building the guests on $builder" nix eval --json "$test.nodes" --apply 'nodes: builtins.mapAttrs (_: node: node.system.build.toplevel.drvPath) nodes' |