let
# Intentionally not binding `gtk3` beforehand
# so that we can use `inherit` without running into
# infrec.
gtk3 = pkgs.gtk3.overrideAttrs {
patches = [
(pkgs.fetchpatch {
name = "fix-entry-completion";
url = "https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2681.patch";
hash = "sha256-PAg7jbdKFOSDCqZuyM/DOxsmF8d8LeoJxytaTkHhjpk=";
})
];
};
in
darktable.override {
inherit gtk3;
}
Well, that will definitely apply the patch. Presumably it just doesn’t fix what you think it does.
By the way, using with makes it ambiguous (to human readers) what variable refers to what. I’d suggest either not using it at all or limiting its scope to less complex code.
Not how nix packaging works. Nix compiles against libraries in /nix/store to prevent this.
Looks like your issue is in the schemas, though, and the schemas are in fact propagated via an environment variable, which means you need to apply a wrapper, and we did forget to also override the gtk version for it.
I’m talking about gsettings schemas. They’re basically some XML that can be accessed via the gtk APIs to specify various inter-application settings in a programmatic way. In fairness, it’s not just the schemas, there are also extensions of the API and all the gobject introspection stuff.
Gtk is quite a complex system, and since it’s not just a C API but an API accessed via many different languages, many of its details aren’t just encoded in classic C library form, which means that a lot of it is exposed via gtk-specific environment variables and settings.
Since all that doesn’t follow standard C build expectations, the standard nixpkgs builder doesn’t capture any of it by default, and that’s why we need the hook that makes a wrapper wrapper; that way nix can properly do its thing of confining an application’s inputs exactly to its closure.