From 0b51b8ac8b5b9d7692e2ee6fbcabfc6b2d3d2cb1 Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Mon, 7 Sep 2026 20:45:11 -0500 Subject: [PATCH 1/3] Add claude-desktop, Anthropic's Linux desktop beta Anthropic ships the Claude desktop app for Linux only through its own Debian repository, so the package repacks the deb the way openai-codex-desktop does: extract data.tar.xz, replace the bare /usr/bin symlink with a launcher that asks Chromium for Wayland directly, and keep the vendor copyright as the license. Updates come through the declarative "debian" upstream provider: the apt Packages index names the newest version, and the per-architecture pool debs are hashed when one appears. Verified by pinning 1.44121.2 and watching bin/sync-upstream rewrite it back to 1.46388.2 byte-identically. --- .../claude-desktop/.omarchy/package.json | 12 +++ pkgbuilds/claude-desktop/PKGBUILD | 83 +++++++++++++++++++ .../claude-desktop/claude-desktop-launcher.sh | 32 +++++++ 3 files changed, 127 insertions(+) create mode 100644 pkgbuilds/claude-desktop/.omarchy/package.json create mode 100644 pkgbuilds/claude-desktop/PKGBUILD create mode 100644 pkgbuilds/claude-desktop/claude-desktop-launcher.sh diff --git a/pkgbuilds/claude-desktop/.omarchy/package.json b/pkgbuilds/claude-desktop/.omarchy/package.json new file mode 100644 index 0000000..c089113 --- /dev/null +++ b/pkgbuilds/claude-desktop/.omarchy/package.json @@ -0,0 +1,12 @@ +{ + "source": "local", + "release_ring": "fast", + "upstream": { + "debian": "https://downloads.claude.ai/claude-desktop/apt/stable/dists/stable/main/binary-amd64/Packages", + "package": "claude-desktop", + "sources": { + "x86_64": ["https://downloads.claude.ai/claude-desktop/apt/stable/pool/main/c/claude-desktop/claude-desktop_{pkgver}_amd64.deb"], + "aarch64": ["https://downloads.claude.ai/claude-desktop/apt/stable/pool/main/c/claude-desktop/claude-desktop_{pkgver}_arm64.deb"] + } + } +} diff --git a/pkgbuilds/claude-desktop/PKGBUILD b/pkgbuilds/claude-desktop/PKGBUILD new file mode 100644 index 0000000..8eab40b --- /dev/null +++ b/pkgbuilds/claude-desktop/PKGBUILD @@ -0,0 +1,83 @@ +# Maintainer: Spencer Bull + +# Omarchy tracks Anthropic's own Debian repository, the only channel the +# Linux beta ships through. The declarative "debian" upstream provider in +# .omarchy/package.json rewrites the version and checksums below from that +# repository's package index. + +pkgname=claude-desktop +pkgver=1.46388.2 +pkgrel=1 +pkgdesc="Official Claude desktop app with Claude Code" +arch=('x86_64' 'aarch64') +url="https://claude.ai" +license=('custom') + +depends=( + 'alsa-lib' + 'at-spi2-core' + 'bash' + 'gcc-libs' + 'glibc' + 'gtk3' + 'libdrm' + 'libnotify' + 'libsecret' + 'libxcb' + 'libxtst' + 'mesa' + 'nss' + 'util-linux-libs' + 'xdg-desktop-portal' + 'xdg-utils' +) + +optdepends=( + 'gnome-keyring: store credentials in a system keyring' + 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' + 'virtiofsd: file sharing with the Cowork virtual machine' +) +optdepends_x86_64=('qemu-system-x86: run Cowork tasks in a local virtual machine') +optdepends_aarch64=('qemu-system-aarch64: run Cowork tasks in a local virtual machine') + +makedepends=('libarchive') +options=('!debug' '!strip') + +# Omarchy: same treatment as openai-codex-desktop. The build image compresses +# with zstd at its default level, which leaves this 560 MB Electron tree at +# 210 MB. Maximum zstd takes it to 160 MB for ~3 extra minutes of build time +# -- worth it for a package every user re-downloads on each of Anthropic's +# frequent releases. +COMPRESSZST=(zstd -c -z -q --ultra -22 --threads=0 -) + +_deb_x86_64="claude-desktop_${pkgver}_amd64.deb" +_deb_aarch64="claude-desktop_${pkgver}_arm64.deb" +source=('claude-desktop-launcher.sh') +_pool="https://downloads.claude.ai/claude-desktop/apt/stable/pool/main/c/claude-desktop" +source_x86_64=("${_deb_x86_64}::${_pool}/${_deb_x86_64}") +source_aarch64=("${_deb_aarch64}::${_pool}/${_deb_aarch64}") +noextract=("${_deb_x86_64}" "${_deb_aarch64}") +sha256sums=('edfdbc63b65891ef7c481b07086c7e630fc102c042b6ed65331a52fcaf72b14a') +sha256sums_x86_64=('98bf54e85e4916068c4281459b0f0431d8ff68034773f3ee98311d7206566ab1') +sha256sums_aarch64=('b944a2154528815bb476bfb1e7091f8a3e329b3c67f6c11de8d41668a603bd9e') + +package() { + cd "${srcdir}" + + local deb_var="_deb_${CARCH}" + local deb="${!deb_var}" + + bsdtar -xOf "${deb}" data.tar.xz | + bsdtar --no-same-owner -xf - -C "${pkgdir}" + + # Upstream's /usr/bin/claude-desktop is a bare symlink to the Electron + # binary; replace it with a launcher that picks the right Ozone platform. + rm "${pkgdir}/usr/bin/claude-desktop" + install -Dm755 claude-desktop-launcher.sh "${pkgdir}/usr/bin/claude-desktop" + + install -Dm644 "${pkgdir}/usr/share/doc/claude-desktop/copyright" \ + "${pkgdir}/usr/share/licenses/${pkgname}/copyright" + + # Debian package-policy files are not used on Arch Linux. + rm -rf "${pkgdir}/usr/share/doc" "${pkgdir}/usr/share/lintian" +} diff --git a/pkgbuilds/claude-desktop/claude-desktop-launcher.sh b/pkgbuilds/claude-desktop/claude-desktop-launcher.sh new file mode 100644 index 0000000..b6db841 --- /dev/null +++ b/pkgbuilds/claude-desktop/claude-desktop-launcher.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -euo pipefail + +user_flags=() +config_home="${XDG_CONFIG_HOME:-}" +[[ -n "$config_home" || -z "${HOME:-}" ]] || config_home="$HOME/.config" +flags_file="${config_home:+$config_home/claude-desktop-flags.conf}" + +if [[ -n "$flags_file" && -f "$flags_file" && -r "$flags_file" ]]; then + while IFS= read -r line || [[ -n "$line" ]]; do + line="${line%%#*}" + [[ -n "${line//[[:space:]]/}" ]] || continue + read -r -a flags <<<"$line" + user_flags+=("${flags[@]}") + done <"$flags_file" +fi + +# Chromium's own Ozone detection falls back to XWayland often enough to matter, +# and the result is a blurry window on every scaled display. Ask for Wayland +# directly, unless the user has already picked a platform themselves. +platform_flags=() +if [[ -n "${WAYLAND_DISPLAY:-}" || "${XDG_SESSION_TYPE:-}" == wayland ]]; then + platform_flags=(--ozone-platform=wayland) + + for flag in "${user_flags[@]}" "$@"; do + case "$flag" in + --ozone-platform=* | --ozone-platform-hint=*) platform_flags=() ;; + esac + done +fi + +exec /usr/lib/claude-desktop/claude-desktop "${platform_flags[@]}" "${user_flags[@]}" "$@" From cef906d03a13246e5785b8ab7a0b16a89fec150f Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Wed, 9 Sep 2026 22:11:54 -0500 Subject: [PATCH 2/3] Make the Cowork optdepends deliver Cowork, and name the Claude Code sandbox deps The app probes Debian's paths for its VM stack: /usr/libexec/virtiofsd then /usr/bin/virtiofsd, and /usr/share/OVMF/OVMF_CODE_4M.fd with the VARS path derived from it. Arch ships virtiofsd at /usr/lib/virtiofsd and the firmware at /usr/share/edk2/x64/OVMF_CODE.4m.fd, so installing the advertised optdepends still left Cowork reporting QEMU missing. Symlinks at the probed paths map them onto Arch's; the app's probe reads through them, they dangle harmlessly until the optdepends arrive, and /usr/libexec keeps the virtiofsd link out of $PATH while it does. The firmware optdepend moves into optdepends_x86_64, and aarch64 loses its Cowork optdepends entirely: the aarch64 builds run against Arch Linux ARM, which ships no UEFI firmware package at all, so both the edk2 name and the qemu-system-aarch64 entry promised a VM that cannot boot there. The embedded Claude Code diagnoses missing sandbox dependencies when bubblewrap and socat are absent; they join the optdepends under the same wording as the standalone claude-code package. Co-Authored-By: Claude Fable 5 Co-Authored-By: Codex XHigh --- pkgbuilds/claude-desktop/PKGBUILD | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/pkgbuilds/claude-desktop/PKGBUILD b/pkgbuilds/claude-desktop/PKGBUILD index 8eab40b..810d106 100644 --- a/pkgbuilds/claude-desktop/PKGBUILD +++ b/pkgbuilds/claude-desktop/PKGBUILD @@ -34,11 +34,16 @@ depends=( optdepends=( 'gnome-keyring: store credentials in a system keyring' - 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' + 'bubblewrap: Claude Code sandboxing' + 'socat: Claude Code sandboxing' 'virtiofsd: file sharing with the Cowork virtual machine' ) -optdepends_x86_64=('qemu-system-x86: run Cowork tasks in a local virtual machine') -optdepends_aarch64=('qemu-system-aarch64: run Cowork tasks in a local virtual machine') +optdepends_x86_64=( + 'qemu-system-x86: run Cowork tasks in a local virtual machine' + 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' +) +# No Cowork optdepends on aarch64: Arch Linux ARM ships no UEFI firmware +# package, so the app's /usr/share/AAVMF probe has nothing to resolve to. makedepends=('libarchive') options=('!debug' '!strip') @@ -78,6 +83,17 @@ package() { install -Dm644 "${pkgdir}/usr/share/doc/claude-desktop/copyright" \ "${pkgdir}/usr/share/licenses/${pkgname}/copyright" + # Cowork probes Debian's paths for its VM stack; map them onto Arch's. + # The links dangle harmlessly until the matching optdepends are installed. + install -d "${pkgdir}/usr/libexec" + ln -s ../lib/virtiofsd "${pkgdir}/usr/libexec/virtiofsd" + if [[ "${CARCH}" == x86_64 ]]; then + # The app derives the VARS path from the CODE path, so both need a link. + install -d "${pkgdir}/usr/share/edk2" + ln -s x64/OVMF_CODE.4m.fd "${pkgdir}/usr/share/edk2/OVMF_CODE_4M.fd" + ln -s x64/OVMF_VARS.4m.fd "${pkgdir}/usr/share/edk2/OVMF_VARS_4M.fd" + fi + # Debian package-policy files are not used on Arch Linux. rm -rf "${pkgdir}/usr/share/doc" "${pkgdir}/usr/share/lintian" } From 959fa525084a8c071dda89a09bbe76677752a5d0 Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Thu, 10 Sep 2026 08:32:08 -0500 Subject: [PATCH 3/3] Keep every Cowork optdepend and shim x86_64-only virtiofsd sat in the common optdepends, so aarch64 still advertised one third of a Cowork stack the package deliberately promises nothing else of there. It joins qemu and the firmware in optdepends_x86_64, and the virtiofsd shim moves under the same branch, so an aarch64 package carries no Cowork pieces at all. Co-Authored-By: Claude Fable 5 Co-Authored-By: Codex XHigh --- pkgbuilds/claude-desktop/PKGBUILD | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgbuilds/claude-desktop/PKGBUILD b/pkgbuilds/claude-desktop/PKGBUILD index 810d106..a886c9b 100644 --- a/pkgbuilds/claude-desktop/PKGBUILD +++ b/pkgbuilds/claude-desktop/PKGBUILD @@ -36,14 +36,14 @@ optdepends=( 'gnome-keyring: store credentials in a system keyring' 'bubblewrap: Claude Code sandboxing' 'socat: Claude Code sandboxing' - 'virtiofsd: file sharing with the Cowork virtual machine' ) +# Cowork is x86_64-only here: Arch Linux ARM ships no UEFI firmware package, +# so on aarch64 the app's /usr/share/AAVMF probe has nothing to resolve to. optdepends_x86_64=( 'qemu-system-x86: run Cowork tasks in a local virtual machine' 'edk2-ovmf: UEFI firmware for the Cowork virtual machine' + 'virtiofsd: file sharing with the Cowork virtual machine' ) -# No Cowork optdepends on aarch64: Arch Linux ARM ships no UEFI firmware -# package, so the app's /usr/share/AAVMF probe has nothing to resolve to. makedepends=('libarchive') options=('!debug' '!strip') @@ -85,9 +85,9 @@ package() { # Cowork probes Debian's paths for its VM stack; map them onto Arch's. # The links dangle harmlessly until the matching optdepends are installed. - install -d "${pkgdir}/usr/libexec" - ln -s ../lib/virtiofsd "${pkgdir}/usr/libexec/virtiofsd" if [[ "${CARCH}" == x86_64 ]]; then + install -d "${pkgdir}/usr/libexec" + ln -s ../lib/virtiofsd "${pkgdir}/usr/libexec/virtiofsd" # The app derives the VARS path from the CODE path, so both need a link. install -d "${pkgdir}/usr/share/edk2" ln -s x64/OVMF_CODE.4m.fd "${pkgdir}/usr/share/edk2/OVMF_CODE_4M.fd"