provision: kitty desktop integration; pinned rust + source-built tree-sitter CLI#5
Open
krishna-bala wants to merge 2 commits into
Open
provision: kitty desktop integration; pinned rust + source-built tree-sitter CLI#5krishna-bala wants to merge 2 commits into
krishna-bala wants to merge 2 commits into
Conversation
Per kitty's install docs: copy kitty.desktop and kitty-open.desktop into ~/.local/share/applications with Exec/Icon rewritten to the bundle's absolute paths (the shipped entries assume kitty is on the system PATH), and register kitty for xdg-terminal-exec via ~/.config/xdg-terminals.list. Generated by provisioning rather than symlinked by dotbot because the paths embed $HOME.
nvim-treesitter (main branch) requires the tree-sitter CLI >= 0.26.1,
but every upstream prebuilt since 0.25.0 is compiled on Ubuntu 24.04
runners and dies on 22.04 with:
tree-sitter: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.39'
not found (required by tree-sitter)
No official prebuilt can satisfy both machines, so the CLI is built
from source at a pinned version instead: rustup-init is downloaded at
a pinned version and verified against rust-lang.org's published
sha256, installs a pinned toolchain (rustup verifies its own signed
manifests), and cargo install --locked builds tree-sitter-cli with
every crate checksummed against the crates.io registry. Built against
the local glibc, the same pinned version runs on 22.04 and 24.04.
bashrc has always sourced ~/.cargo/env ('cargo is used in nvim via
mason'), so a rust toolchain was already an unprovisioned assumption
of this setup; it is now pinned and provisioned like everything else.
rustup-init runs with --no-modify-path so it can never edit the
repo-symlinked shell files.
Validated end-to-end in a scratch CARGO_HOME: rustup 1.29.0 sha256
verified, rust 1.96.1 installed, tree-sitter-cli 0.26.10 built in
under 2 minutes and reports its pinned version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two provisioning follow-ups to #4.
kitty desktop integration
#4 installed the kitty bundle and bin symlinks but skipped the desktop-integration steps from kitty's install docs. The kitty install block now also:
kitty.desktopandkitty-open.desktopinto~/.local/share/applications/, rewritingExec=andIcon=to the bundle's absolute paths. The shipped entries assume kitty is on the system-wide PATH, which launchers spawned outside a login shell can't rely on. Both Exec variants are rewritten, includingkitty +open %U.kitty.desktopto~/.config/xdg-terminals.listso xdg-terminal-exec (and desktop environments that support it) use kitty.The
ln -sfstep from the docs was already covered byinstall_release_bundle. The generated files embed$HOME, so they belong to provisioning rather than dotbot symlinks, keeping the repo's no-templating rule.pinned rust toolchain + source-built tree-sitter CLI
Fixes the fresh-machine nvim failure where every parser install died with
tree-sitter: /lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.39' not found. Root cause: nvim-treesitter (main) requires the tree-sitter CLI >= 0.26.1, and every upstream prebuilt since 0.25.0 is compiled on Ubuntu 24.04 runners (glibc 2.39), so no official prebuilt can run on 22.04 (glibc 2.35).The CLI is therefore built from source at a pinned version: rustup-init downloaded at a pinned version and verified against rust-lang.org's published sha256, a pinned toolchain (1.96.1; rustup verifies its own signed manifests), then
cargo install tree-sitter-cli --version 0.26.10 --lockedwith every crate checksummed against the crates.io registry. Built against the local glibc, the same pinned version runs on both 22.04 and 24.04.bashrc has always sourced
~/.cargo/envwith the comment "cargo is used in nvim via mason", so a rust toolchain was already an unprovisioned assumption of this setup; it is now pinned and provisioned like everything else.rustup-initruns with--no-modify-pathso it can never edit the repo-symlinked shell files.Verified separately: the nvim, kitty, lsd, and glab artifacts this repo pins need at most glibc 2.34, so all pinned binaries are 22.04-safe; the tree-sitter CLI was the only glibc-2.39 dependency.
Test plan
$HOMEwith the real 0.47.4 bundle: both.desktopfiles land with absolute Exec/Icon paths, the referenced icon exists,xdg-terminals.listcontainskitty.desktop.CARGO_HOME: rustup 1.29.0 sha256 verified, rust 1.96.1 installed, tree-sitter-cli 0.26.10 built from source in under 2 minutes and reports its pinned version.shellcheck -S warningclean.:MasonUninstall tree-sitter-clior delete the binary) so the cargo-built one on PATH wins inside nvim.🤖 Generated with Claude Code
https://claude.ai/code/session_01SnU9EQrAZfjjhTTTt1PFAr