Skip to content

packaging(nix): use the top-level X11 libraries, not the deprecated xorg set - #763

Merged
adibhanna merged 1 commit into
ZenNotes:v2.48.0from
blueagledev:nix/xorg-top-level
Sep 11, 2026
Merged

adibhanna merged 1 commit into
ZenNotes:v2.48.0from
blueagledev:nix/xorg-top-level

Conversation

@blueagledev

Copy link
Copy Markdown
Contributor

On nixpkgs 26.05 and later, evaluating zennotes-desktop prints 12 The xorg package set has been deprecated warnings, one per xorg.* library in packaging/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 with Function called without required argument "xorg".

Verification (x86_64-linux, the flake's pinned nixpkgs 9ae611a455b9, 26.11 development, last modified 2026-06-10):

rev warnings drvPath
main 431907d 12 /nix/store/d7d77qz728xdjjizxh5g92f3ahyzlcik-zennotes-desktop-2.47.0.drv
this PR 0 same

nix build .#zennotes-desktop at this commit exits 0 with /nix/store/kis0vmfkkiwwvx8s7jv2sgv4l490inij-zennotes-desktop-2.47.0, and the checks from nix-build.yml's "Validate desktop package" step pass on it when run locally: the interpreter is patched into the store, chrome-sandbox is removed, and ldd reports no unresolved libraries.

Tradeoff: requires nixpkgs >= 25.11, drops 25.05. 25.05 has no lowercase top-level libx11, so there this fails with Function called without required argument "libx11". That hits the README's copy-the-file route and flake consumers who point zennotes.inputs.nixpkgs.follows at 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-06 in aliases.nix). So they fail under allowAliases = false and 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:run or build locally: outside packaging/nix/ only flake.nix reads this file, no npm workspace does, and ci.yml runs all three (build:prod) on pull requests.

…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.
Copilot AI lite review requested due to automatic review settings September 10, 2026 08:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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
adibhanna changed the base branch from main to v2.48.0 September 11, 2026 14:35

@adibhanna adibhanna left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@adibhanna
adibhanna merged commit ba4ae68 into ZenNotes:v2.48.0 Sep 11, 2026
8 checks passed
adibhanna added a commit that referenced this pull request Sep 11, 2026
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
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.

3 participants