Python error on nixos-rebuild "cython-0.29.37.1"

Running a update today prints this error.
Adding python 3.11 or 3.10 changed nothing.
This had no issue yesterday so I think something changed on the nixpkg side.


building the system configuration...
error:
… while calling the 'head' builtin
at /nix/store/k948lhivp5zpgswwnikm14hh6hqbjwcg-source/lib/attrsets.nix:1534:13:
1533|           if length values == 1 || pred here (elemAt values 1) (head values) then
1534|             head values
|             ^
1535|           else

… while evaluating the attribute 'value'
at /nix/store/k948lhivp5zpgswwnikm14hh6hqbjwcg-source/lib/modules.nix:1086:7:
1085|     // {
1086|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
|       ^
1087|       inherit (res.defsFinal') highestPrio;

… while evaluating the option `system.build.toplevel':

… while evaluating definitions from `/nix/store/k948lhivp5zpgswwnikm14hh6hqbjwcg-source/nixos/modules/system/activation/top-level.nix':

… while evaluating the option `warnings':

… while evaluating definitions from `/nix/store/k948lhivp5zpgswwnikm14hh6hqbjwcg-source/nixos/modules/system/boot/systemd.nix':

… while evaluating the option `systemd.services.waydroid-container.serviceConfig':

… while evaluating definitions from `/nix/store/k948lhivp5zpgswwnikm14hh6hqbjwcg-source/nixos/modules/virtualisation/waydroid.nix':

(stack trace truncated; use '--show-trace' to show the full, detailed trace)

error: cython-0.29.37.1 not supported for interpreter python3.13
Command '['nix', '--extra-experimental-features', 'nix-command flakes', 'build', '--print-out-paths', '/etc/nixos#nixosConfigurations."nixos".config.system.build.toplevel', '--no-link']' returned non-zero exit status 1.
Operating System: NixOS 25.11
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.16.0-rc2-cachyos (64-bit)
Graphics Platform: Wayland

Looks like setting virtualisation.waydroid.enable = false; and #waydriod for now tell its fixed is the answer its been reported here Build failure: waydroid · Issue #418453 · NixOS/nixpkgs · GitHub

I’m also getting this, I don’t have waydroid in my configs so I’m trying to see if there’s anything else I’m doing that’s tripping over this python problem if disabling it worked for you…

Okay, using --show-trace on the build command I found out that zrythm on unstable has a problem with the cython version provided for me, so rolling just that package back to 24.11 channel seems to let me build now.

It seems like there’s a larger python version refactoring going on that probably has some stuff that needs to catch up.

The default python version was recently changed to be 3.13, and hit master a few days ago. This caused the breakage you’re experiencing. The discussion in the issue you linked already shows a possible overlay (which pins the python version for waydroid to 3.12), and refers to the PR which fixed waydroid. It’s already building on master again, and will be included in the next nix{os,pkgs}-unstable bump.

1 Like