Skip to content

new(ziglang.org/zls): Zig Language Server (source build)#13116

Open
tannevaled wants to merge 1 commit into
pkgxdev:mainfrom
tannevaled:tannevaled/new/zls
Open

new(ziglang.org/zls): Zig Language Server (source build)#13116
tannevaled wants to merge 1 commit into
pkgxdev:mainfrom
tannevaled:tannevaled/new/zls

Conversation

@tannevaled
Copy link
Copy Markdown
Contributor

Summary

Adds the Zig Language Server as projects/ziglang.org/zls/package.yml, a sub-package under the existing ziglang.org recipe.

  • From-source build via zig build install -Doptimize=ReleaseSafe. The parent ziglang.org bottle vendors prebuilt zig as a chicken-and-egg exception; downstream Zig tooling like zls is compiled here from source against that bottle.
  • Build dep: ziglang.org: '~0.15.1' — zls 0.15.1's minimum_zig_version is 0.15.1, and pantry's current ziglang.org bottle is 0.15.2 (satisfies ~0.15.1).
  • Dependency fetching: zig's package manager fetches the three declared tarball deps (known-folders, diffz, lsp-kit) during zig build. The lazy tracy dep is not pulled because tracy is not enabled. Caches are kept inside the build tree (--global-cache-dir/--cache-dir) so the build doesn't touch $HOME.
  • skip: fix-patchelf — zig produces statically-linked binaries; matches the parent ziglang.org recipe's pattern.
  • Version pin: versions.ignore: - /^0\.16/. zls 0.16.0 exists but requires zig 0.16, which upstream has not released yet. The pin should be removed once ziglang.org ships a 0.16 bottle.

This is the standard cross-distro approach — see Arch's zls PKGBUILD which also drives zig build install -Doptimize=ReleaseSafe against a system zig.

Test plan

  • CI builds on linux/x86-64
  • CI builds on linux/aarch64
  • CI builds on darwin/aarch64
  • CI builds on darwin/x86-64
  • zls --version prints 0.15.1

🤖 Generated with Claude Code

Builds zls from source via `zig build install`, using pantry's
existing ziglang.org bottle as a build dependency. zig's package
manager fetches the declared dependencies (known-folders, diffz,
lsp-kit) during the build.

Pinned to the 0.15.x line via `ignore: /^0\.16/` because zls 0.16
requires zig 0.16, which upstream has not yet released. Re-evaluate
when zig 0.16 ships.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant