Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,18 @@ jobs:
# already carries 23, and nobody touching omarchy-nvim should inherit them.
# The split-makedepends rule is printed but never gates: it fires on any
# split package whose parts depend on each other (19 of the 23).
recipes:
driver-names:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this job lands under the namcap comment meant for recipes. Please move it above the comment.

— Marcelo's agent

runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Run the Vulkan driver-name resolver test
run: ./tests/vulkan-driver-names-test.sh

recipes:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
30 changes: 23 additions & 7 deletions pkgbuilds/mesa-aurora/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pkgbase=mesa-aurora
pkgname=('mesa-aurora' 'vulkan-aurora')
epoch=1
Expand Down Expand Up @@ -34,9 +34,15 @@
'lm_sensors' 'zlib' 'zstd' 'xcb-util-keysyms')
# Use a distinct VCS cache name when changing repository origin. Existing
# makepkg caches named mesa belong to Aurora and reject a different URL.
source=("$_src::git+$url.git#commit=$_commit")
sha256sums=('SKIP')
source=("$_src::git+$url.git#commit=$_commit"
'vulkan-driver-names.sh')
sha256sums=('SKIP'
'e9b50d18a6e5dfd91f3b09ed768f143594316c5934b37a08d09d5b8a1bcd8102')
options=('!debug')
# The Vulkan driver meson option is "borealis" after Aurora's rename, with
# "asahi" kept as a warning alias (Ryan 2026-11-20). "asahi" still selects
# the same driver on today's pin; the bump carrying the rename quotes the
# renamed meson.options declaration and switches this once it is real.
_options=(-Dplatforms=x11,wayland
-Dgallium-drivers=asahi,zink,softpipe,llvmpipe -Dvulkan-drivers=asahi
-Degl=enabled -Dgbm=enabled -Dglx=dri -Dgles1=enabled -Dgles2=enabled
Expand Down Expand Up @@ -108,21 +114,31 @@
'vulkan-mesa-implicit-layers')
provides=("mesa=$epoch:$pkgver" 'mesa-libgl' 'opengl-driver' 'libgbm.so')
conflicts=('mesa')
source "$srcdir/vulkan-driver-names.sh"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: nothing in package_mesa-aurora() calls the helper any more, so this source can go.

— Marcelo's agent

cp -a "$srcdir/mesa-stage/usr" "$pkgdir/"
rm "$pkgdir/usr/lib/libvulkan_asahi.so"
rm "$pkgdir"/usr/share/vulkan/icd.d/*asahi*.json
# The Vulkan driver moves to its own package under either name (Aurora
# renamed it to Borealis, Ryan 2026-11-20). Incremental stages can hold
# both spellings, so remove both libraries here.
rm -f "$pkgdir"/usr/lib/libvulkan_{asahi,borealis}.so
rm -f "$pkgdir"/usr/share/vulkan/icd.d/*asahi*.json \
"$pkgdir"/usr/share/vulkan/icd.d/*borealis*.json
rmdir "$pkgdir/usr/share/vulkan/icd.d" "$pkgdir/usr/share/vulkan" 2>/dev/null || true

}
package_vulkan-aurora() {
pkgdesc='Aurora Honeykrisp Vulkan driver'
pkgdesc='Aurora Borealis Vulkan driver'
depends=('expat' 'glibc' 'gcc-libs' 'libdrm' 'libdisplay-info' 'libx11' 'libxcb'
'libxshmfence' 'systemd-libs' 'vulkan-icd-loader' 'wayland'
'xcb-util-keysyms' 'zlib' 'zstd')
provides=("vulkan-asahi=$epoch:$pkgver" "vulkan-asahi-aurora=$epoch:$pkgver" 'vulkan-driver')
conflicts=('vulkan-asahi' 'vulkan-asahi-aurora')
replaces=('vulkan-asahi-aurora')
install -Dm755 "$srcdir/mesa-stage/usr/lib/libvulkan_asahi.so" "$pkgdir/usr/lib/libvulkan_asahi.so"
source "$srcdir/vulkan-driver-names.sh"
local drv_lib drv_icd
drv_lib=$(driver_library "$srcdir/mesa-stage/usr/lib")
install -Dm755 "$srcdir/mesa-stage/usr/lib/$drv_lib" "$pkgdir/usr/lib/$drv_lib"
install -d "$pkgdir/usr/share/vulkan/icd.d"
cp -a "$srcdir"/mesa-stage/usr/share/vulkan/icd.d/*asahi*.json "$pkgdir/usr/share/vulkan/icd.d/"
drv_icd=$(driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: only the resolved manifest is installed now.

— Marcelo's agent

install -Dm644 "$srcdir/mesa-stage/usr/share/vulkan/icd.d/$drv_icd" \
"$pkgdir/usr/share/vulkan/icd.d/$drv_icd"
}
40 changes: 40 additions & 0 deletions pkgbuilds/mesa-aurora/vulkan-driver-names.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# Resolve the Vulkan driver file names inside a staged Mesa tree.
#
# Aurora renamed its Vulkan driver to Borealis (Ryan 2026-11-20): the driver
# library becomes libvulkan_borealis.so and the ICD manifest becomes
# borealis_icd.<arch>.json. The Khronos enum entry keeps its Honeykrisp
# name and the meson option keeps an "asahi" alias, so a build tree can hold
# either spelling. These helpers name whichever spelling is present.
#
# Usage:
# source vulkan-driver-names.sh
# driver_library "$srcdir/mesa-stage/usr/lib" # -> libvulkan_asahi.so or libvulkan_borealis.so
# driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d" # -> the ICD JSON file name

# The driver library file name, preferring the Borealis name.
driver_library() {
local dir=$1
if [[ -f "$dir/libvulkan_borealis.so" ]]; then
echo "libvulkan_borealis.so"
elif [[ -f "$dir/libvulkan_asahi.so" ]]; then
echo "libvulkan_asahi.so"
else
echo "no Vulkan driver library (libvulkan_borealis.so or libvulkan_asahi.so) in $dir" >&2
return 1
fi
}

# The ICD manifest file name, preferring the Borealis name.
driver_icd() {
local dir=$1
local candidate
for candidate in "$dir"/borealis_icd.*.json "$dir"/asahi_icd.*.json; do
if [[ -f "$candidate" ]]; then
basename "$candidate"
return 0
fi
done
echo "no Vulkan ICD manifest (borealis_icd.*.json or asahi_icd.*.json) in $dir" >&2
return 1
}
40 changes: 29 additions & 11 deletions pkgbuilds/omarchy-mlx/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Maintainer: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>

pkgbase=omarchy-mlx
Expand Down Expand Up @@ -29,13 +29,15 @@
source=("omarchy-mlx-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz"
"$_wheel::$url/releases/download/v$pkgver/${_wheel//+/%2B}"
"$_vendor::$url/releases/download/v$pkgver/$_vendor"
"mesa-$_mesa_commit.tar.gz::https://github.com/joshuaswarren/mesa-1/archive/$_mesa_commit.tar.gz")
"mesa-$_mesa_commit.tar.gz::https://github.com/joshuaswarren/mesa-1/archive/$_mesa_commit.tar.gz"
'vulkan-driver-names.sh')
noextract=("$_wheel" "$_vendor")
sha256sums=(
'8da755708fce0b9a29fa04d570d90d6acb3964f94cfbff708625aeb495016192'
'5e7ab221771a006e677874c23a833ad5a8b3d7f1b839e0d56ccca6a1f2c6b82c'
'b909e477785fce58cbd91a731569ec3fa70656dc5d34d7c907128423ad9caaff'
'fc26edaef4b6025435416b9ac9d145869b967b5ce564d7a216ab3a79bd6a6ecf'
'e9b50d18a6e5dfd91f3b09ed768f143594316c5934b37a08d09d5b8a1bcd8102'
)

prepare() {
Expand All @@ -49,6 +51,10 @@
# Vulkan driver only: no GL, no gallium drivers, no window systems, no layers.
# The tarball has no .git; git_sha1.h is generated at compile time from this.
export MESA_GIT_SHA1_OVERRIDE=$_mesa_sha
# The meson option is "borealis" after Aurora's rename, with "asahi" kept
# as a warning alias (Ryan 2026-11-20). "asahi" still selects the same
# driver on today's pin; the bump carrying the rename quotes the renamed
# meson.options declaration and switches this once it is real.
meson setup "mesa-1-$_mesa_commit" build-mesa \
--prefix=/usr \
--libdir=lib \
Expand Down Expand Up @@ -82,7 +88,9 @@
}

check() {
grep -aq "(git-$_mesa_sha)" "$srcdir/mesa-stage/usr/lib/libvulkan_asahi.so"
source "$srcdir/vulkan-driver-names.sh"
grep -aq "(git-$_mesa_sha)" \
"$srcdir/mesa-stage/usr/lib/$(driver_library "$srcdir/mesa-stage/usr/lib")"
"$srcdir/stage/usr/lib/omarchy-mlx/venv/bin/python" \
-c 'import mlx.core, mlx_omarchy_paths, mlx_omarchy_serve'
[[ -z $(LC_ALL=C find "$srcdir/stage" -name '*[! -~]*') ]]
Expand All @@ -103,27 +111,37 @@
}

package_omarchy-mlx-vulkan() {
pkgdesc='Honeykrisp Vulkan driver for omarchy-mlx only (private ICD, not used by other programs)'
pkgdesc='Borealis Vulkan driver for omarchy-mlx only (private ICD, not used by other programs)'
license=('MIT AND BSD-3-Clause AND SGI-B-2.0')
groups=('omarchy-platform-apple-silicon')
depends=('expat' 'gcc-libs' 'glibc' 'libdrm' 'libelf' 'llvm-libs' 'spirv-tools' 'zstd')
conflicts=('mesa-honeykrisp-omarchy')

source "$srcdir/vulkan-driver-names.sh"
local dir=/usr/lib/omarchy-mlx/vulkan
install -Dm755 "$srcdir/mesa-stage/usr/lib/libvulkan_asahi.so" "$pkgdir$dir/libvulkan_asahi.so"
# Aurora renamed the driver to Borealis (Ryan 2026-11-20): the library and
# the ICD manifest carry the new names. Take whichever the tree has, and
# ship the ICD under both names so the runtime finds it either way.
local drv_lib drv_icd
drv_lib=$(driver_library "$srcdir/mesa-stage/usr/lib")
drv_icd=$(driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d")
install -Dm755 "$srcdir/mesa-stage/usr/lib/$drv_lib" "$pkgdir$dir/$drv_lib"
# The ICD manifest stays out of the loader's search path; only omarchy-mlx
# names it. library_path is absolute.
python - "$srcdir/mesa-stage/usr/share/vulkan/icd.d/asahi_icd.aarch64.json" \
"$pkgdir$dir/honeykrisp_icd.aarch64.json" "$dir/libvulkan_asahi.so" <<'PY'
python - "$srcdir/mesa-stage/usr/share/vulkan/icd.d/$drv_icd" \
"$pkgdir$dir/honeykrisp_icd.aarch64.json" "$pkgdir$dir/borealis_icd.aarch64.json" \
"$dir/$drv_lib" <<'PY'
import json, sys
src, dst, lib = sys.argv[1:]
src, dst_honeykrisp, dst_borealis, lib = sys.argv[1:]
manifest = json.load(open(src))
manifest["ICD"]["library_path"] = lib
with open(dst, "w") as f:
json.dump(manifest, f, indent=4)
f.write("\n")
for dst in (dst_honeykrisp, dst_borealis):
with open(dst, "w") as f:
json.dump(manifest, f, indent=4)
f.write("\n")
PY
chmod 644 "$pkgdir$dir/honeykrisp_icd.aarch64.json"
chmod 644 "$pkgdir$dir/honeykrisp_icd.aarch64.json" \
"$pkgdir$dir/borealis_icd.aarch64.json"
printf '%s\n' "$_mesa_sha" | install -Dm644 /dev/stdin "$pkgdir$dir/mesa-git-sha"
install -Dm644 "$srcdir/mesa-1-$_mesa_commit/docs/license.rst" \
"$pkgdir/usr/share/licenses/$pkgname/license.rst"
Expand Down
40 changes: 40 additions & 0 deletions pkgbuilds/omarchy-mlx/vulkan-driver-names.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# Resolve the Vulkan driver file names inside a staged Mesa tree.
#
# Aurora renamed its Vulkan driver to Borealis (Ryan 2026-11-20): the driver
# library becomes libvulkan_borealis.so and the ICD manifest becomes
# borealis_icd.<arch>.json. The Khronos enum entry keeps its Honeykrisp
# name and the meson option keeps an "asahi" alias, so a build tree can hold
# either spelling. These helpers name whichever spelling is present.
#
# Usage:
# source vulkan-driver-names.sh
# driver_library "$srcdir/mesa-stage/usr/lib" # -> libvulkan_asahi.so or libvulkan_borealis.so
# driver_icd "$srcdir/mesa-stage/usr/share/vulkan/icd.d" # -> the ICD JSON file name

# The driver library file name, preferring the Borealis name.
driver_library() {
local dir=$1
if [[ -f "$dir/libvulkan_borealis.so" ]]; then
echo "libvulkan_borealis.so"
elif [[ -f "$dir/libvulkan_asahi.so" ]]; then
echo "libvulkan_asahi.so"
else
echo "no Vulkan driver library (libvulkan_borealis.so or libvulkan_asahi.so) in $dir" >&2
return 1
fi
}

# The ICD manifest file name, preferring the Borealis name.
driver_icd() {
local dir=$1
local candidate
for candidate in "$dir"/borealis_icd.*.json "$dir"/asahi_icd.*.json; do
if [[ -f "$candidate" ]]; then
basename "$candidate"
return 0
fi
done
echo "no Vulkan ICD manifest (borealis_icd.*.json or asahi_icd.*.json) in $dir" >&2
return 1
}
71 changes: 71 additions & 0 deletions tests/vulkan-driver-names-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
# Self-test for the Vulkan driver file-name resolver used by the omarchy-mlx
# and mesa-aurora PKGBUILDs: Aurora renamed the driver to Borealis, and the
# staged Mesa tree can carry either spelling (Ryan 2026-11-20).
set -euo pipefail
ROOT=$(realpath "${BASH_SOURCE[0]%/*}/..")
# One helper copy must stay byte-identical to the other: both PKGBUILDs
# source their own file, so drift here means the packages disagree.
if ! cmp -s "$ROOT/pkgbuilds/omarchy-mlx/vulkan-driver-names.sh" \
"$ROOT/pkgbuilds/mesa-aurora/vulkan-driver-names.sh"; then
echo "FAIL: pkgbuilds/omarchy-mlx/vulkan-driver-names.sh and pkgbuilds/mesa-aurora/vulkan-driver-names.sh differ" >&2
exit 1
fi
# shellcheck source=pkgbuilds/omarchy-mlx/vulkan-driver-names.sh
source "$ROOT/pkgbuilds/omarchy-mlx/vulkan-driver-names.sh"
pass() { echo "PASS: $1"; }
fail() { echo "FAIL: $1"; exit 1; }

expect() {
local what=$1 want=$2 got=$3
if [[ "$got" == "$want" ]]; then
pass "$what"
else
fail "$what: wanted '$want', got '$got'"
fi
}

tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT

# The Borealis spelling (what Aurora's tree carries after the rename).
mkdir -p "$tmp/borealis/usr/lib" "$tmp/borealis/usr/share/vulkan/icd.d"
touch "$tmp/borealis/usr/lib/libvulkan_borealis.so"
touch "$tmp/borealis/usr/share/vulkan/icd.d/borealis_icd.aarch64.json"
expect "the Borealis driver library is found" "libvulkan_borealis.so" \
"$(driver_library "$tmp/borealis/usr/lib")"
expect "the Borealis ICD manifest is found" "borealis_icd.aarch64.json" \
"$(driver_icd "$tmp/borealis/usr/share/vulkan/icd.d")"

# The legacy spelling (today's Mesa tree).
mkdir -p "$tmp/legacy/usr/lib" "$tmp/legacy/usr/share/vulkan/icd.d"
touch "$tmp/legacy/usr/lib/libvulkan_asahi.so"
touch "$tmp/legacy/usr/share/vulkan/icd.d/asahi_icd.aarch64.json"
expect "the legacy driver library is found" "libvulkan_asahi.so" \
"$(driver_library "$tmp/legacy/usr/lib")"
expect "the legacy ICD manifest is found" "asahi_icd.aarch64.json" \
"$(driver_icd "$tmp/legacy/usr/share/vulkan/icd.d")"

# Both present: the renamed one wins, so a mixed tree is not ambiguous.
cp "$tmp/borealis/usr/lib/libvulkan_borealis.so" "$tmp/legacy/usr/lib/"
cp "$tmp/borealis/usr/share/vulkan/icd.d/borealis_icd.aarch64.json" \
"$tmp/legacy/usr/share/vulkan/icd.d/"
expect "a tree with both spellings resolves to Borealis" "libvulkan_borealis.so" \
"$(driver_library "$tmp/legacy/usr/lib")"
expect "a tree with both ICD spellings resolves to Borealis" "borealis_icd.aarch64.json" \
"$(driver_icd "$tmp/legacy/usr/share/vulkan/icd.d")"

# Neither present: the helper refuses instead of naming a file that is not there.
mkdir -p "$tmp/empty/usr/lib" "$tmp/empty/usr/share/vulkan/icd.d"
if driver_library "$tmp/empty/usr/lib" >/dev/null 2>&1; then
fail "an empty tree must not resolve a driver library"
else
pass "an empty tree refuses a driver library"
fi
if driver_icd "$tmp/empty/usr/share/vulkan/icd.d" >/dev/null 2>&1; then
fail "an empty tree must not resolve an ICD manifest"
else
pass "an empty tree refuses an ICD manifest"
fi

echo "All driver-name resolver checks passed."
Loading