From a9bd8d202f203fe9659ed37efc4daf2af9cb29ed Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 7 Jan 2026 13:43:32 +0100 Subject: [PATCH] packaging(arch): make nix optional on non-x86_64 architectures Arch Linux ARM currently ships a broken/out-of-sync nix package with unresolvable dependencies. Declare nix as a hard dependency only on x86_64 and as optional on other architectures, allowing installation while relying on the official Nix installer bootstrap. https://chatgpt.com/share/695e483c-1f68-800f-9f94-87d5295b871d --- packaging/arch/PKGBUILD | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 10f60fa..3e56ef5 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -8,8 +8,18 @@ arch=('any') url="https://github.com/kevinveenbirkenbach/package-manager" license=('MIT') -# Nix is the only runtime dependency; Python is provided by the Nix closure. -depends=('nix') +# Nix is required at runtime to run pkgmgr via the flake. +# On Arch x86_64 we can depend on the distro package. +# On other arches (e.g. ARM) we only declare it as optional because the +# repo package may be broken/out-of-sync; installation can be done via the official installer. +depends=() +optdepends=('nix: required to run pkgmgr via flake') + +if [[ "${CARCH}" == "x86_64" ]]; then + depends=('nix') + optdepends=() +fi + makedepends=('rsync') install=${pkgname}.install