packaging(nix): use the top-level X11 libraries, not the deprecated xorg set - #763
Conversation
…org set nixpkgs 26.05 deprecated the xorg package set in favour of the top-level names, which exist from 25.11 on. Each xorg package now emits an evaluation warning when instantiated, and package-desktop.nix uses 12 of them; with allowAliases = false the set is absent and the file fails to evaluate. This takes the same 12 libraries as top-level arguments instead. The resulting derivation is unchanged: same drvPath before and after on the flake's pinned nixpkgs. Requires nixpkgs >= 25.11; drops 25.05, which has no lowercase top-level libx11. That affects the copy-the-file route in packaging/nix/README.md and flake consumers that make zennotes follow a 25.05 nixpkgs; the flake's own lock is unaffected. 25.05 has been end-of-life since 2025-12-31.
There was a problem hiding this comment.
🟢 Approval recommended
The changes remove deprecated warnings while preserving the existing derivation output.
Pull request overview
Updates Nix desktop packaging to use canonical top-level X11 libraries, removing deprecated xorg warnings.
Changes:
- Replaces 12
xorg.*dependencies with lowercase top-level attributes. - Preserves the derivation output.
- Requires nixpkgs ≥ 25.11.
File summaries
| File | Description |
|---|---|
packaging/nix/package-desktop.nix |
Uses canonical top-level X11 libraries. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
adibhanna
left a comment
There was a problem hiding this comment.
Reviewed for inclusion in v2.48.0. No blocking findings.
Confirmed that all 12 replacements exactly match the canonical mappings in our pinned nixpkgs revision, with no other package logic changes. The merge into v2.48.0 is clean and limited to packaging/nix/package-desktop.nix; the Nix packaging inputs are otherwise identical to main.
Approved the previously blocked fork workflows and verified they passed: Nix desktop/server builds, desktop layout and ELF/library validation, the headless launch (window ready, still running at the 25-second timeout), production dependency audit, CodeQL, and all four platform build/test jobs. The latest v2.48.0 checks also passed independently.
Compatibility note: this requires nixpkgs 25.11 or newer and drops 25.05. The repository-pinned nixpkgs is compatible. Thanks for the focused change and detailed verification.
Release notes and the social post for 2.48.0: the three Cloud conflict fixes, the upload stream and sync status fixes, Escape cancelling a Quick Capture selection (#765) and the Nix packaging update (#763). No demo clip was recorded for this release. Claude-Session: https://claude.ai/code/session_01Pa8u7FTkwZD3zZ5AoFxKC8
On nixpkgs 26.05 and later, evaluating
zennotes-desktopprints 12The xorg package set has been deprecatedwarnings, one perxorg.*library inpackaging/nix/package-desktop.nix. This renames those 12 to their top-level names and touches nothing else. It is the rename from #422 without the other changes, with the build output and nixpkgs rev that review asked for; unlike #422 it uses the lowercase names (see below).On the default config this does not fix a broken build, as the review on #432 said: the derivation is identical. It removes the warnings, and it makes the file evaluate with
allowAliases = false, where the current one fails withFunction called without required argument "xorg".Verification (x86_64-linux, the flake's pinned nixpkgs
9ae611a455b9, 26.11 development, last modified 2026-06-10):main431907d/nix/store/d7d77qz728xdjjizxh5g92f3ahyzlcik-zennotes-desktop-2.47.0.drvnix build .#zennotes-desktopat this commit exits 0 with/nix/store/kis0vmfkkiwwvx8s7jv2sgv4l490inij-zennotes-desktop-2.47.0, and the checks fromnix-build.yml's "Validate desktop package" step pass on it when run locally: the interpreter is patched into the store,chrome-sandboxis removed, andlddreports no unresolved libraries.Tradeoff: requires nixpkgs >= 25.11, drops 25.05. 25.05 has no lowercase top-level
libx11, so there this fails withFunction called without required argument "libx11". That hits the README's copy-the-file route and flake consumers who pointzennotes.inputs.nixpkgs.followsat a 25.05 nixpkgs; the flake's own lock is unaffected. The capitalized names (libX11, …) would also clear the warnings and keep 25.05 working, but on current nixpkgs they are aliases themselves (libX11 = libx11; # Added 2026-02-06inaliases.nix). So they fail underallowAliases = falseand would need renaming again when those aliases go, and I used the canonical ones. 25.05 has been end-of-life since 2025-12-31 and 25.11 since 2026-06-30. On 25.11 the drvPath is unchanged by this PR.I did not run
npm run typecheck,test:runorbuildlocally: outsidepackaging/nix/onlyflake.nixreads this file, no npm workspace does, andci.ymlruns all three (build:prod) on pull requests.