Unfortunately there's no pkgs.libsForQt5.callPackages, which we need here to get .override attributes on all derivation attributes. It's also non-trivial to add it without duplicating code. So instead just use standard pkgs.callPackages and pass refer to qt libs through pkgs.qt5