How to properly set QT_QPA_PLATFORM=xcb for an app

I found (with help) that I can make normcap work when setting
QT_QPA_PLATFORM=xcb

But how can I/we fix this in nixpkgs, so that one can just install&run it normally?

Found many different ways this env var is set, and tried to find those that are also a python package, but the python ones only set it to e.g. offscreen in the check/install phase:

  • vorta (setting in preCheck)

Other apps use e.g.:

I guess the latter might be most promising, but I’m fishing in unknown waters here :thinking:

Please try if this fixes it for you: normcap: refactor, wrap with runtime inputs, enable checks, add maintainer by pbsds · Pull Request #268840 · NixOS/nixpkgs · GitHub