Gtk4 only available through nix-shell

I have gtk4 in my configuration.nix, like

	environment.systemPackages = with pkgs; [

Why there are no dev commands available?
And nix-shell -p gtk4 --run "compgen -c | grep gtk4" and compgen -c | grep gtk4 output is different?
And things like gtk4-icon-browser available only through nix-shell?

compgen -c | grep gtk4


nix-shell -p gtk4 --run "compgen -c | grep gtk4"


environment.systemPackages does not install development outputs by default – mainly bin output, out output, or whatever is listed first in outputs attribute of the derivation. Plus man output, if present. The order is described in stdenv.mkDerivation, and can be overridden in the package using meta.outputsToInstall (see the algorithm of buildEnv, which the environment.systemPackages option uses). It is also possible to add extra outputs to the environment using environment.extraOutputsToInstall NixOS option, or bypass these mechanisms altogether using explicitly.

Then what the best variant to find all available package variation?
Since we have
git and gitFull
vim and vim_configurable
ffmpeg and ffmpeg-full
gtk4 and
I’m confused about naming… is not a variant but rather one of the outputs of a multiple-output derivation.

As for variants, you can check out package search or grep Nixpkgs (specifically pkgs/top-level/all-packages.nix). You can also use nix-locate program from nix-index package to find which packages contains a certain file.

Similarly, gtk4-launch is only present in So what is currently the recommended way to launch a software from a gtk4 app? Rely on the gtk3 package with gtk-lanch? (possibly increasing the size of the closure) Use + gtk4-launch, and possibly also increase the size of the closure? Or fix gtk4 in NixOs to pack gtk4-launch?

I think it is a bug in our packaging:

Though for apps, I would probably recommend using the Gio API directly rather than launching another process.