From 0a65168b0992416dd141209849d5a9a25562e1dc Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Fri, 25 Sep 2026 19:56:22 +1000 Subject: [PATCH] Move the platform detector to omarchy-settings with the guard The settings package's platform guard runs omarchy-hw-platform before the omarchy runtime is installed. omarchy leaves the detector out of its bin/ loop and settings ships it, with the /usr/share/omarchy/bin link the Apple predicate and the CLI router use, whenever the source has it. --- pkgbuilds/omarchy-dev/PKGBUILD | 5 +++-- pkgbuilds/omarchy-settings-dev/PKGBUILD | 12 ++++++++++-- pkgbuilds/omarchy-settings/PKGBUILD | 12 ++++++++++-- pkgbuilds/omarchy/PKGBUILD | 5 +++-- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/pkgbuilds/omarchy-dev/PKGBUILD b/pkgbuilds/omarchy-dev/PKGBUILD index 58630edd..ce16459b 100644 --- a/pkgbuilds/omarchy-dev/PKGBUILD +++ b/pkgbuilds/omarchy-dev/PKGBUILD @@ -110,14 +110,15 @@ package() { # Runtime binaries — ship everything in bin/ except the debug helpers # that ship from omarchy-settings (needed before omarchy is installed, - # e.g. on the ISO live env). + # e.g. on the ISO live env), and the platform detector, which the settings + # package's pacman platform guard runs before omarchy is installed. install -d "$pkgdir/usr/bin" "$pkgdir/usr/share/omarchy/bin" for bin in bin/*; do [[ -f $bin ]] || continue local base base=$(basename "$bin") case "$base" in - omarchy-debug|omarchy-debug-idle|omarchy-upload-log) + omarchy-debug|omarchy-debug-idle|omarchy-upload-log|omarchy-hw-platform) continue ;; esac diff --git a/pkgbuilds/omarchy-settings-dev/PKGBUILD b/pkgbuilds/omarchy-settings-dev/PKGBUILD index 70fb2389..d5bd59f9 100644 --- a/pkgbuilds/omarchy-settings-dev/PKGBUILD +++ b/pkgbuilds/omarchy-settings-dev/PKGBUILD @@ -366,8 +366,16 @@ EOF # Pacman platform guard: refuses packages tagged for another hardware # platform. It ships here, not in omarchy, so it is resident before the - # runtime and any hardware package install; the hook and the script it runs - # travel together. Conditional until the pinned source carries them. + # runtime and any hardware package install; the hook, the script it runs and + # the platform detector that script asks all travel together. omarchy leaves + # the detector out of its bin/ loop; the share/bin link keeps the Apple + # predicate's "detector beside me" lookup and the CLI router working. + # Conditional until the pinned source carries them. + if [[ -f bin/omarchy-hw-platform ]]; then + install -Dm755 bin/omarchy-hw-platform "$pkgdir/usr/bin/omarchy-hw-platform" + install -d "$pkgdir/usr/share/omarchy/bin" + ln -s /usr/bin/omarchy-hw-platform "$pkgdir/usr/share/omarchy/bin/omarchy-hw-platform" + fi if [[ -f default/libalpm/hooks/00-omarchy-platform-guard.hook ]]; then install -Dm644 default/libalpm/hooks/00-omarchy-platform-guard.hook \ "$pkgdir/usr/share/libalpm/hooks/00-omarchy-platform-guard.hook" diff --git a/pkgbuilds/omarchy-settings/PKGBUILD b/pkgbuilds/omarchy-settings/PKGBUILD index 093af887..d44015a5 100644 --- a/pkgbuilds/omarchy-settings/PKGBUILD +++ b/pkgbuilds/omarchy-settings/PKGBUILD @@ -364,8 +364,16 @@ EOF # Pacman platform guard: refuses packages tagged for another hardware # platform. It ships here, not in omarchy, so it is resident before the - # runtime and any hardware package install; the hook and the script it runs - # travel together. Conditional until the pinned source carries them. + # runtime and any hardware package install; the hook, the script it runs and + # the platform detector that script asks all travel together. omarchy leaves + # the detector out of its bin/ loop; the share/bin link keeps the Apple + # predicate's "detector beside me" lookup and the CLI router working. + # Conditional until the pinned source carries them. + if [[ -f bin/omarchy-hw-platform ]]; then + install -Dm755 bin/omarchy-hw-platform "$pkgdir/usr/bin/omarchy-hw-platform" + install -d "$pkgdir/usr/share/omarchy/bin" + ln -s /usr/bin/omarchy-hw-platform "$pkgdir/usr/share/omarchy/bin/omarchy-hw-platform" + fi if [[ -f default/libalpm/hooks/00-omarchy-platform-guard.hook ]]; then install -Dm644 default/libalpm/hooks/00-omarchy-platform-guard.hook \ "$pkgdir/usr/share/libalpm/hooks/00-omarchy-platform-guard.hook" diff --git a/pkgbuilds/omarchy/PKGBUILD b/pkgbuilds/omarchy/PKGBUILD index 41314eab..1ac7d532 100644 --- a/pkgbuilds/omarchy/PKGBUILD +++ b/pkgbuilds/omarchy/PKGBUILD @@ -110,14 +110,15 @@ package() { # Runtime binaries — ship everything in bin/ except the debug helpers # that ship from omarchy-settings (needed before omarchy is installed, - # e.g. on the ISO live env). + # e.g. on the ISO live env), and the platform detector, which the settings + # package's pacman platform guard runs before omarchy is installed. install -d "$pkgdir/usr/bin" "$pkgdir/usr/share/omarchy/bin" for bin in bin/*; do [[ -f $bin ]] || continue local base base=$(basename "$bin") case "$base" in - omarchy-debug|omarchy-debug-idle|omarchy-upload-log) + omarchy-debug|omarchy-debug-idle|omarchy-upload-log|omarchy-hw-platform) continue ;; esac