nix: resolve the archive's terminfo, follow launcher symlinks, ship a desktop entry #369
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!369
Loading…
Reference in a new issue
No description provided.
Delete branch "dist/terminfo-and-desktop-entry"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
TERMINFO_DIRSand follow symlinks (nix/dist-linux.sh,nix/dist-macos.sh). The launchers prepend<root>/share/terminfoand keep any existing value. An unset variable gets a trailing empty element, which stands for the host's default directories. The export is skipped when the directory is already listed, because the CLI launcher execs the client launcher. The launchers now resolve a symlink to themselves with a plainreadlinkloop, which is POSIX sh and works with bash 3.2 and older macOS. Thefelis doctorterminfo hint now saystic -x share/terminfo/felis.terminfoapplies to a source checkout.share/applications/felis.desktopis validated withdesktop-file-validateinnix/package.nixand installed to$out/share/applications. home-manager picks it up throughhome.packages. The Linux archive ships the entry and the manifest script checks for it. On Linux the client sets Waylandapp_id/ X11WM_CLASStofelisto matchStartupWMClass.Why
The rc.5 audit found two problems. First, a session from the Linux archive on stock ubuntu:24.04 had
TERM=xterm-felisbut no way to resolve it, sotput colorsfailed. Second, abin/felissymlinked into~/.local/binexited with 127. There was also no desktop entry and no stable window class.Principle check: 1 through 4 pass. This is packaging for the launcher and the WM, which are the dedicated tools, and not an in-terminal feature.
How verified
nix build .#felis-dist, thenlinux-archive-manifest.shon the unpacked tree.linux-archive-smoke.shinubuntu:24.04(rootless docker, same mounts asrelease.yml): all sections pass. That includes the new b4 check: a session started through a two-hop symlink getstput colors= 256, the doctor terminfo row is ok, and the child'sTERMINFO_DIRSis exactly/opt/felis/share/terminfo:. The GUI marker smoke also passes.desktop-file-validatepasses, both standalone and inside the package build.WM_CLASS = "felis", "felis". Waylandapp_idwas not observed because no compositor was available, but it is the same winit field.just checkpasses./usr/bin/tput) was only syntax- and shellcheck-checked locally. It runs on the macOS runner.