How to find which package dependency it is?

When you rebuild, use --show-trace and scroll through the logs (I know…) to get info on the package it was trying to build. You will see some message like while evaluating derivation <packagename>.

Some filtering along these lines could be done, e.g.

nixos-rebuild build --show-trace 2>/dev/stdout | grep 'while evaluating derivation'

(Normally I’d suggest nix-tree --derivation or such, but I doubt it’d work here as this is an eval-time error.)

There aren’t many packages that depend on electron_27 in nixpkgs anyway, a simple ripgrep gives the following:

  • logseq
  • micropad
  • pocket-casts
  • whalebird