Repository navigation
Conversation
|
/cc @jtojnar |
There was a problem hiding this comment.
This is already part of wrapGAppsHook:
nixpkgs/pkgs/build-support/setup-hooks/wrap-gapps-hook.sh
Lines 29 to 31 in 7374650
There was a problem hiding this comment.
Preferably, the hook would be added to nativeBuildInputs.
There was a problem hiding this comment.
Can confirm gsettings_desktop_schemas are correctly picked up by GTK in Transmission in Sway.
I also considered adding hicolor_icon_theme as a hook dependency but since it is probably only needed by apps with CSD, file chooser dialogue or similar advanced constructs, it is probably wiser to add it to the respective applications’ dependencies.
|
Could you please squash the third commit into the first one and add some description to the second one (at least the issue link)? |
|
@jtojnar Done, thank you! |
|
We should probably clean up the now-superfluous gsettings_desktop_schemas in various packages like dconf-editor. |
|
Actually, would it make sense to make GTK rather than the hook depend on the schemas? diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index fe6d37ec692..40231edf40e 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -4,7 +4,7 @@
, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols
, xineramaSupport ? stdenv.isLinux
, cupsSupport ? stdenv.isLinux, cups ? null
-, darwin
+, darwin, gnome3
}:
assert cupsSupport -> cups != null;
@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
patches = [ ./3.0-immodules.cache.patch ];
- buildInputs = [ libxkbcommon epoxy json_glib ];
+ buildInputs = [ libxkbcommon epoxy json_glib gnome3.gsettings_desktop_schemas ];
propagatedBuildInputs = with xorg; with stdenv.lib;
[ expat glib cairo pango gdk_pixbuf atk at_spi2_atk
libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ]
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 08f04faf041..23a9bb27fe0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -346,7 +346,7 @@ with pkgs;
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
wrapGAppsHook = makeSetupHook {
- deps = [ gnome3.dconf.lib gnome3.gtk gnome3.gsettings_desktop_schemas librsvg makeWrapper ];
+ deps = [ gnome3.dconf.lib gnome3.gtk librsvg makeWrapper ];
} ../build-support/setup-hooks/wrap-gapps-hook.sh;
separateDebugInfo = makeSetupHook { } ../build-support/setup-hooks/separate-debug-info.sh; |
|
/cc GTK maintainers @raskin, @vcunat, @lethalman |
|
@jtojnar With your patch dconf settings are not applied to e.g. transmission when testing this way: Am I missing anything? |
|
Sorry, should have added it to diff --git a/pkgs/development/libraries/gtk+/3.x.nix b/pkgs/development/libraries/gtk+/3.x.nix
index fe6d37ec692..57366bc3582 100644
--- a/pkgs/development/libraries/gtk+/3.x.nix
+++ b/pkgs/development/libraries/gtk+/3.x.nix
@@ -4,7 +4,7 @@
, waylandSupport ? stdenv.isLinux, wayland, wayland-protocols
, xineramaSupport ? stdenv.isLinux
, cupsSupport ? stdenv.isLinux, cups ? null
-, darwin
+, darwin, gnome3
}:
assert cupsSupport -> cups != null;
@@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libxkbcommon epoxy json_glib ];
propagatedBuildInputs = with xorg; with stdenv.lib;
- [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk
+ [ expat glib cairo pango gdk_pixbuf atk at_spi2_atk gnome3.gsettings_desktop_schemas
libXrandr libXrender libXcomposite libXi libXcursor libSM libICE ]
++ optionals waylandSupport [ wayland wayland-protocols ]
++ optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ AppKit Cocoa ])
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 08f04faf041..23a9bb27fe0 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -346,7 +346,7 @@ with pkgs;
findXMLCatalogs = makeSetupHook { } ../build-support/setup-hooks/find-xml-catalogs.sh;
wrapGAppsHook = makeSetupHook {
- deps = [ gnome3.dconf.lib gnome3.gtk gnome3.gsettings_desktop_schemas librsvg makeWrapper ];
+ deps = [ gnome3.dconf.lib gnome3.gtk librsvg makeWrapper ];
} ../build-support/setup-hooks/wrap-gapps-hook.sh;
separateDebugInfo = makeSetupHook { } ../build-support/setup-hooks/separate-debug-info.sh; |
|
@jtojnar This one works, thank you! |
|
@jtojnar Done, thanks! |
So dconf settings will be applied to GTK3 programs even if running outside of Gnome. See #31293
|
Why do you propagate this dependency from GTK and not from some Gnome package? (glib?) AFAIK GTK applications can not use GSettings without compiling with it. |
|
Oh, I was confused, gsettings is an inherent part of libgio, which is one of glib libraries, which is an inherent dependency of GTK. I'll have to study GTK on NixOS more to be able to review such changes. |
|
@orivej As described in the issue, GSettings is required when running on Wayland. We could apply the patch from the upstream bug but it would still not work while applications depend on dconf – we would also need to fix #11239 – and it still would not work for applications inherently require dconf (i.e. most gnome apps). |
Motivation for this change
So dconf settings will be applied to GTK3 programs even if running outside of Gnome. See #31293
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)