gtk4 in my configuration.nix, like
environment.systemPackages = with pkgs; [
Why there are no dev commands available?
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
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
Then what the best variant to find all available package variation?
Since we have
I’m confused about naming…
gtk4.dev 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.
gtk4-launch is only present in
gtk4.dev. 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.