desktop: fix catppuccin-gtk build on python 3.14 / matplotlib 3.11 - #618
Conversation
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.
There was a problem hiding this comment.
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.
| @@ -72,6 +72,7 @@ | ||
| import matplotlib as mpl | ||
| import matplotlib.colors | ||
| import matplotlib.style | ||
| +from matplotlib import rc_params_from_file |
There was a problem hiding this comment.
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
Root cause
classic-laddie's system build is broken on main:
python3.14-catppuccin-2.5.0(a dependency ofcatppuccin-gtk-1.0.3, used for GTK theming inhome/desktop.nix) fails its check phase with: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.overlaysentry inmodules/common/desktop.nix:455d916d0cpython3Packages.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 pythoncatppuccinlibrary (the actual failing derivation), routed through catppuccin-gtk'spython3argument so nothing else rebuilds.894acc94f6catppuccin-gtk: fix build with python314+— patches catppuccin-gtk'ssources/build/args.py(argparsetype=bool+BooleanOptionalActionis 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-link— full local toplevel build succeeded (note: CI only dry-runs evaluation, so this is stated explicitly here; the patchedcatppuccin-gtk-1.0.3built 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-rebuildonce on classic-laddie to bootstrap the auto-rebuild loop (see #613).Run: 20260712-0926-0fc6e840