exe_mod.linkSystemLibrary("gtk-4", .{ .use_pkg_config = .no });
exe_mod.linkSystemLibrary("gobject-2.0", .{});
In my case, at least, this doesn't change the full library tree because gtk-4 still links against all of the libraries that are removed from this binary's list, but it does mean that programs which calculate dependencies, like dpkg-shlibdeps, won't report spurious "required" dependencies when analyzing the binary.When building on Ubuntu 26.04, the binary no longer directly links against lib{pango, cairo, pangocairo, cairo-gobject, harfbuzz, gdk_pixbuf, graphene, gio, vulkan}.
Can't create an account on the site so I figured I'd post this here. If you're going for absolute minimalism this seems like another step in the right direction for anyone building on a more 'gratuitous' GTK build (such as Ubuntu's)
And in languages like zig or odin which are quite similar to C in many ways, writing bindings to C code really isn’t bad. It is so easy that I decided to write my own bindings in Odin to sqlite - bindings exist but it really was so very easy that I didn’t want to bring in a generator or another dependency.
$ cat ~/scripts/pinentry-askpass
#!/usr/bin/env bash
pinentry <<INPUT | grep '^D ' | cut -c 3-
SETPROMPT Password:
GETPIN
INPUT
$ cat ~/.bashrc | grep ASKPASS
export SUDO_ASKPASS="$HOME/scripts/pinentry-askpass"
export SSH_ASKPASS="$SUDO_ASKPASS"
It automatically launches the GTK, TTY, or QT version depending on your environment.It's also useful for agents to use sudo, you can write in instructions to tool-call `sudo -A` and you get a GUI popup to enter the password, and the agent continues from there. And since the "prompt" in pinentry can be customised... you can get the agent to set up a temporary askpass, which replaces "Password:" in the prompt with questions like "Can I delete this old log file in /var?" and you enter your password to authorise.