Can't update because of an opaque KDE Plasma 5 dependency on Plasma 6 configuration

Hello, the issue I’m experiencing is the following:

Using my flake-based nixos config I’ve run sudo nix flake update --flake /etc/nixos to update the inputs (I’m using the nixos-unstable repo) and then I’ve run sudo nixos-rebuild switch as I usually did to update my system and after updating the system config. I’ve got an error message that I can’t find referenced anywhere and since I’m using Plasma 6, and I’m not explicitly adding extra-cmake-modules in my environment.systemPackages and neither do I explicitly add environment.etc.dbus-1.source, it makes little sense to me. The error message that sudo nixos-rebuild switch gave is:

$ sudo nixos-rebuild boot
building the system configuration…
error:
… while calling the ‘derivationStrict’ builtin
at «nix-internal»/derivation-internal.nix:37:12:
36|
37|   strict = derivationStrict drvAttrs;
|            ^
38|

   … while evaluating derivation 'nixos-system-sharccnix-26.05.20260515.d233902'
     whose name attribute is located at «github:nixos/nixpkgs/d233902339c02a9c334e7e593de68855ad26c4cb?narHash=sha256-30sZNZoA1cqF5JNO9fVX%2BwgiQYjB7HJqqJ4ztCDeBZE%3D»/pkgs/stdenv/generic/make-derivation.nix:618:11

   … while evaluating attribute 'buildCommand' of derivation 'nixos-system-sharccnix-26.05.20260515.d233902'
     at «github:nixos/nixpkgs/d233902339c02a9c334e7e593de68855ad26c4cb?narHash=sha256-30sZNZoA1cqF5JNO9fVX%2BwgiQYjB7HJqqJ4ztCDeBZE%3D»/nixos/modules/system/activation/top-level.nix:64:7:
       63|       passAsFile = [ "extraDependencies" ];
       64|       buildCommand = systemBuilder;
         |       ^
       65|

   … while evaluating the option `environment.etc.dbus-1.source':

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

   error: The libsForQt5.extra-cmake-modules package and the corresponding top-level extra-cmake-modules alias have been removed, as KDE Gear 5 and Plasma 5 have reached end of life.
   Please explicitly use kdePackages.extra-cmake-modules for the latest Qt 6-based version.

Command ‘nix --extra-experimental-features ‘nix-command flakes’ build --print-out-paths ‘/etc/nixos#nixosConfigurations.“sharccnix”.config.system.build.toplevel’ --no-link’ returned non-zero exit status 1.

I assume one of the packages declared in the configuration is dependent on Plasma 5 version of extra-cmake-modules, which is EoL, but I don’t know how it’s possible to figure that out, which one that is. Note: adding kdePackages.extra-cmake-modules to environment.systemPackages as stated in the error message made no difference.

I can post relevant parts of my configuration if needed.

Also I would note that I’m very new to nixos and this might be an issue with an obvious solution that I just couldn’t found. Any help would be appreciated.

Is your config stored somewhere public? It will be very difficult to diagnose without that.

I’ve found the source of the issue, it’s an issue with a third-party flake, I will close this issue now

I would still love to know the way of finding the cause of it without trying and testing every flake or package that I have in my configuration if something similar happens again, since the error message didn’t give me any indication of a possible culprit

1 Like

It can sometimes help to try --show-trace as the error message suggested. You do have to learn to scan the output though because it tends to be quite verbose.

The command nix-option can be another useful diagnostic tool to identify where a certain option is set from, although it tends to require a config that can successfully evaluate.

Hierarchical and modular configs can also sometimes turn “testing every flake or package” into more of a bisection than a linear search.