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.
This commit is contained in:
Marcelo Alcantara committed 2026-09-25 19:56:22 +10:00
1 parent 00fac82ad3
commit 0a65168b09
4 files changed
+26 -8

No files matched your search

+3 -2
View File
@@ -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
+10 -2
View File
@@ -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"
+10 -2
View File
@@ -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"
+3 -2
View File
@@ -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