Skip to content

desktop: fix catppuccin-gtk build on python 3.14 / matplotlib 3.11 - #618

Merged
patflynn merged 1 commit into
mainfrom
agent/20260712-0926-0fc6e840
Jul 12, 2026
Merged

desktop: fix catppuccin-gtk build on python 3.14 / matplotlib 3.11#618
patflynn merged 1 commit into
mainfrom
agent/20260712-0926-0fc6e840

Conversation

@patflynn

Copy link
Copy Markdown
Owner

Root cause

classic-laddie's system build is broken on main: python3.14-catppuccin-2.5.0 (a dependency of catppuccin-gtk-1.0.3, used for GTK theming in home/desktop.nix) fails its check phase with:

AttributeError: module 'matplotlib.style' has no attribute 'core'

matplotlib 3.11 removed mpl.style.core; catppuccin 2.5.0's matplotlib extra still calls it at import time (upstream issue: catppuccin/python#129, fixed by catppuccin/python#130). This blocks all deploys on classic-laddie (and would break weller/johnny-walker the same way).

Fix

nixpkgs master already fixed this, but the pinned nixos-unstable channel hasn't caught up yet. This PR mirrors the two master commits locally via a nixpkgs.overlays entry in modules/common/desktop.nix:

  • 455d916d0c python3Packages.catppuccin: fix build with matplotlib 3.11+ — applies the Fix #129 (caused by matplotlib 3.11 deprecating mpl.style.core) catppuccin/python#130 patch to the python catppuccin library (the actual failing derivation), routed through catppuccin-gtk's python3 argument so nothing else rebuilds.
  • 894acc94f6 catppuccin-gtk: fix build with python314+ — patches catppuccin-gtk's sources/build/args.py (argparse type=bool + BooleanOptionalAction is an error on python 3.14), the next failure once the python lib builds.

Both patch files are verbatim copies from those nixpkgs commits. The overlay is temporary: remove it once the nixpkgs pin includes both commits — the daily flake.lock update should bring them within days (a comment in the overlay says the same).

Verification

  • nix build .#nixosConfigurations.classic-laddie.config.system.build.toplevel --no-linkfull local toplevel build succeeded (note: CI only dry-runs evaluation, so this is stated explicitly here; the patched catppuccin-gtk-1.0.3 built and is in the closure).
  • nix flake check — all checks passed.
  • klaus _pre-review — no issues found.

Deploy note

After merge, someone needs to run sudo systemctl start cosmo-rebuild once on classic-laddie to bootstrap the auto-rebuild loop (see #613).

Run: 20260712-0926-0fc6e840

python3.14-catppuccin-2.5.0 (dependency of catppuccin-gtk, used for GTK
theming) fails its check phase: matplotlib 3.11 removed mpl.style.core,
which catppuccin 2.5.0's matplotlib extra still calls
(catppuccin/python#129). This broke every desktop host's system build
and blocked all deploys on classic-laddie.

Mirror the two nixpkgs-master fixes that are not yet on the pinned
nixos-unstable channel via an overlay in modules/common/desktop.nix:

- 455d916d0c python3Packages.catppuccin: fix build with matplotlib
  3.11+ (patch from catppuccin/python#130)
- 894acc94f6 catppuccin-gtk: fix build with python314+

Remove the overlay once the nixpkgs pin includes both commits; the
daily flake.lock update should bring them within days.
@patflynn
patflynn merged commit 76a34a9 into main Jul 12, 2026
10 checks passed
@patflynn
patflynn deleted the agent/20260712-0926-0fc6e840 branch July 12, 2026 14:13

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a temporary Nixpkgs overlay for catppuccin-gtk to resolve build failures caused by Python 3.14 and Matplotlib 3.11 compatibility issues. It adds two patch files to address these problems. However, the patch for Matplotlib 3.11 uses Path without importing it from pathlib, which will result in a runtime NameError when the module is loaded.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +15 to +19
@@ -72,6 +72,7 @@
import matplotlib as mpl
import matplotlib.colors
import matplotlib.style
+from matplotlib import rc_params_from_file

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

The patch uses Path on line 31 (Path(CATPPUCCIN_STYLE_DIRECTORY)), but the import from pathlib import Path is missing from the patched file's imports. In catppuccin 2.5.0, catppuccin/extras/matplotlib.py does not import Path by default. This will cause a NameError: name 'Path' is not defined at runtime when the module is imported.

Please include the from pathlib import Path import in the patch, mirroring the full upstream commit from nixpkgs.

@@ -72,6 +72,8 @@
 import matplotlib as mpl
 import matplotlib.colors
 import matplotlib.style
+from pathlib import Path
+from matplotlib import rc_params_from_file
 
 from catppuccin.palette import PALETTE

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