wrapGAppsHook: don't add superfluous inputs#227825
Draft
alyssais wants to merge 2 commits intoNixOS:stagingfrom
Draft
wrapGAppsHook: don't add superfluous inputs#227825alyssais wants to merge 2 commits intoNixOS:stagingfrom
alyssais wants to merge 2 commits intoNixOS:stagingfrom
Conversation
As noted in the comments, there's no reason for wrapGAppsHook to propagate gtk3 at all, or librsvg as a native build input. This also means we can get rid of wrapGAppsHook4, as it's now identical to wrapGAppsHook. It's finally time to do this, because I noticed the extra gtk build input was breaking cross compilation of gcr_4.
Since wrapGAppsHook no longer adds GTK dependencies, there's now no difference between wrapGAppsHook4 and wrapGAppsHook.
jtojnar
reviewed
Apr 23, 2023
jtojnar
reviewed
Apr 23, 2023
| Fortunately, there is [`wrapGAppsHook`]{#ssec-gnome-hooks-wrapgappshook}. It works in conjunction with other setup hooks that populate environment variables, and it will then wrap all executables in `bin` and `libexec` directories using said variables. | ||
|
|
||
| For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. There is also [`wrapGAppsHook4`]{#ssec-gnome-hooks-wrapgappshook4}, which replaces GTK 3 with GTK 4. And in case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring `gtk3` and `librsvg` into the closure. | ||
| For convenience, it also adds `dconf.lib` for a GIO module implementing a GSettings backend using `dconf`, `gtk3` for GSettings schemas, and `librsvg` for GdkPixbuf loader to the closure. In case you are packaging a program without a graphical interface, you might want to use [`wrapGAppsNoGuiHook`]{#ssec-gnome-hooks-wrapgappsnoguihook}, which runs the same script as `wrapGAppsHook` but does not bring and `librsvg` into the closure. |
Member
There was a problem hiding this comment.
, `gtk3` for GSettings schemas can be removed
jtojnar
reviewed
Apr 23, 2023
Member
There was a problem hiding this comment.
Probably also release notes worthy, since it might break (especially external) packages.
Member
There was a problem hiding this comment.
Oh, now I recall why we did not do it yet:
$ comm -23 <(rg wrapGAppsHook -l|sort) <(rg 'gtk(mm)?[234]' -l|sort)
doc/builders/special/fhs-environments.section.md
doc/contributing/contributing-to-documentation.chapter.md
nixos/modules/programs/sway.nix
nixos/modules/services/x11/display-managers/account-service-util.nix
nixos/tests/installed-tests/gnome-photos.nix
pkgs/applications/audio/mopidy/mopidy.nix
pkgs/applications/audio/muso/default.nix
pkgs/applications/backup/timeshift/wrapper.nix
pkgs/applications/editors/bluefish/default.nix
pkgs/applications/editors/bluej/default.nix
pkgs/applications/editors/gnome-latex/default.nix
pkgs/applications/editors/kile/default.nix
pkgs/applications/editors/mindforger/default.nix
pkgs/applications/editors/setzer/default.nix
pkgs/applications/editors/texmaker/default.nix
pkgs/applications/editors/vim/plugins/overrides.nix
pkgs/applications/editors/vscode/generic.nix
pkgs/applications/file-managers/krusader/default.nix
pkgs/applications/finance/cryptowatch/default.nix
pkgs/applications/gis/grass/default.nix
pkgs/applications/gis/qgis/unwrapped-ltr.nix
pkgs/applications/gis/qgis/unwrapped.nix
pkgs/applications/graphics/ciano/default.nix
pkgs/applications/graphics/cloudcompare/default.nix
pkgs/applications/graphics/digikam/default.nix
pkgs/applications/graphics/freecad/default.nix
pkgs/applications/graphics/gscan2pdf/default.nix
pkgs/applications/graphics/hugin/default.nix
pkgs/applications/graphics/imagej/default.nix
pkgs/applications/graphics/kgraphviewer/default.nix
pkgs/applications/graphics/kphotoalbum/default.nix
pkgs/applications/graphics/processing/default.nix
pkgs/applications/graphics/tev/default.nix
pkgs/applications/kde/audiotube.nix
pkgs/applications/kde/kasts.nix
pkgs/applications/kde/kdenlive/default.nix
pkgs/applications/kde/plasmatube/default.nix
pkgs/applications/kde/spectacle.nix
pkgs/applications/misc/barrier/default.nix
pkgs/applications/misc/calibre/default.nix
pkgs/applications/misc/fbmenugen/default.nix
pkgs/applications/misc/feedbackd/default.nix
pkgs/applications/misc/gcstar/default.nix
pkgs/applications/misc/genxword/default.nix
pkgs/applications/misc/holochain-launcher/default.nix
pkgs/applications/misc/keepassxc/default.nix
pkgs/applications/misc/keystore-explorer/default.nix
pkgs/applications/misc/krename/default.nix
pkgs/applications/misc/mako/default.nix
pkgs/applications/misc/maliit-keyboard/default.nix
pkgs/applications/misc/openlp/default.nix
pkgs/applications/misc/pattypan/default.nix
pkgs/applications/misc/pdfsam-basic/default.nix
pkgs/applications/misc/playonlinux/default.nix
pkgs/applications/misc/printrun/default.nix
pkgs/applications/misc/rofi-top/default.nix
pkgs/applications/misc/rofi/wrapper.nix
pkgs/applications/misc/simplenote/default.nix
pkgs/applications/misc/slic3r/default.nix
pkgs/applications/misc/survex/default.nix
pkgs/applications/misc/swappy/default.nix
pkgs/applications/misc/veracrypt/default.nix
pkgs/applications/misc/xdgmenumaker/default.nix
pkgs/applications/misc/xneur/default.nix
pkgs/applications/misc/zathura/core/default.nix
pkgs/applications/networking/browsers/badwolf/default.nix
pkgs/applications/networking/browsers/qutebrowser/default.nix
pkgs/applications/networking/browsers/surf/default.nix
pkgs/applications/networking/clash-verge/default.nix
pkgs/applications/networking/cluster/lens/linux.nix
pkgs/applications/networking/cluster/openlens/default.nix
pkgs/applications/networking/feedreaders/rssguard/default.nix
pkgs/applications/networking/instant-messengers/alfaview/default.nix
pkgs/applications/networking/instant-messengers/cinny-desktop/default.nix
pkgs/applications/networking/instant-messengers/flare-signal/default.nix
pkgs/applications/networking/instant-messengers/wire-desktop/default.nix
pkgs/applications/networking/sniffers/wireshark/default.nix
pkgs/applications/networking/termius/default.nix
pkgs/applications/office/beamerpresenter/default.nix
pkgs/applications/office/gnucash/default.nix
pkgs/applications/office/grisbi/default.nix
pkgs/applications/office/homebank/default.nix
pkgs/applications/office/timeline/default.nix
pkgs/applications/office/treesheets/default.nix
pkgs/applications/office/trilium/desktop.nix
pkgs/applications/office/wpsoffice/default.nix
pkgs/applications/radio/chirp/default.nix
pkgs/applications/radio/gnuradio/wrapper.nix
pkgs/applications/radio/gqrx/default.nix
pkgs/applications/science/astronomy/stellarium/default.nix
pkgs/applications/science/electronics/qucs-s/default.nix
pkgs/applications/science/math/rofi-calc/default.nix
pkgs/applications/science/math/wxmaxima/default.nix
pkgs/applications/terminal-emulators/germinal/default.nix
pkgs/applications/terminal-emulators/tilix/default.nix
pkgs/applications/version-management/github-desktop/default.nix
pkgs/applications/video/aegisub/default.nix
pkgs/applications/video/hypnotix/default.nix
pkgs/applications/video/jellyfin-mpv-shim/default.nix
pkgs/applications/video/obs-studio/default.nix
pkgs/applications/video/plex-mpv-shim/default.nix
pkgs/applications/video/rtabmap/default.nix
pkgs/applications/video/vlc/default.nix
pkgs/applications/virtualization/quickgui/default.nix
pkgs/applications/virtualization/virt-manager/default.nix
pkgs/build-support/setup-hooks/wrap-gapps-hook/wrap-gapps-hook.sh
pkgs/desktops/cinnamon/cinnamon-menus/default.nix
pkgs/desktops/deepin/core/dde-control-center/default.nix
pkgs/desktops/deepin/core/dde-dock/default.nix
pkgs/desktops/deepin/core/dde-file-manager/default.nix
pkgs/desktops/deepin/core/dde-launcher/default.nix
pkgs/desktops/deepin/core/dde-session-shell/default.nix
pkgs/desktops/enlightenment/rage/default.nix
pkgs/desktops/gnome/core/gnome-keyring/default.nix
pkgs/desktops/gnome/core/gnome-online-miners/default.nix
pkgs/desktops/gnome/core/gnome-remote-desktop/default.nix
pkgs/desktops/gnome/core/gnome-session/ctl.nix
pkgs/desktops/gnome/core/gnome-user-share/default.nix
pkgs/desktops/gnome/extensions/extensionOverrides.nix
pkgs/desktops/lumina/lumina/default.nix
pkgs/desktops/mate/mate-settings-daemon/wrapped.nix
pkgs/desktops/mate/mate-terminal/default.nix
pkgs/desktops/mate/pluma/default.nix
pkgs/desktops/pantheon/apps/switchboard/wrapper.nix
pkgs/desktops/pantheon/desktop/wingpanel/wrapper.nix
pkgs/desktops/pantheon/services/contractor/default.nix
pkgs/desktops/plasma-5/kde-gtk-config/0001-gsettings-schemas-path.patch
pkgs/desktops/xfce/mkXfceDerivation.nix
pkgs/desktops/xfce/panel-plugins/xfce4-dockbarx-plugin/default.nix
pkgs/development/interpreters/gnudatalanguage/default.nix
pkgs/development/libraries/at-spi2-core/default.nix
pkgs/development/libraries/bamf/default.nix
pkgs/development/libraries/geoclue/default.nix
pkgs/development/libraries/gstreamer/viperfx/default.nix
pkgs/development/libraries/gvfs/default.nix
pkgs/development/libraries/kde-frameworks/kded.nix
pkgs/development/libraries/xdg-desktop-portal/default.nix
pkgs/development/python-modules/mat2/default.nix
pkgs/development/tools/click/default.nix
pkgs/development/tools/database/sqlitebrowser/default.nix
pkgs/development/tools/scenebuilder/default.nix
pkgs/development/tools/vala-lint/default.nix
pkgs/development/web/cog/default.nix
pkgs/games/vassal/default.nix
pkgs/os-specific/linux/firmware/fwupd/default.nix
pkgs/os-specific/linux/tiscamera/default.nix
pkgs/servers/gpsd/default.nix
pkgs/servers/pulseaudio/default.nix
pkgs/servers/rpiplay/default.nix
pkgs/servers/uxplay/default.nix
pkgs/tools/audio/mpdris2/default.nix
pkgs/tools/bluetooth/blueberry/default.nix
pkgs/tools/graphics/agi/default.nix
pkgs/tools/graphics/gromit-mpx/default.nix
pkgs/tools/inputmethods/ibus-engines/ibus-uniemoji/default.nix
pkgs/tools/misc/archi/default.nix
pkgs/tools/misc/hakuneko/default.nix
pkgs/tools/misc/kronometer/default.nix
pkgs/tools/misc/partition-manager/default.nix
pkgs/tools/misc/peruse/default.nix
pkgs/tools/misc/qflipper/default.nix
pkgs/tools/misc/rmlint/default.nix
pkgs/tools/misc/system-config-printer/default.nix
pkgs/tools/misc/woeusb-ng/default.nix
pkgs/tools/networking/connman/connman-notify/default.nix
pkgs/tools/networking/openvpn3/default.nix
pkgs/tools/security/cryptomator/default.nix
pkgs/tools/system/cm-rgb/default.nix
pkgs/tools/text/kdiff3/default.nix
jtojnar
reviewed
Apr 23, 2023
| gobject-introspection | ||
| wrapGAppsHook4 | ||
| wrapGAppsHook | ||
| ] ++ lib.optional stdenv.isDarwin gtk4; # for gtk4-update-icon-cache |
Member
There was a problem hiding this comment.
This will need to be made unconditional.
Contributor
|
any way i can help this effort? if we renamed or maybe i should just whittle down Jan's list above by adding gtk3/gtk4 as appropriate? |
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
As noted in the comments, there's no reason for wrapGAppsHook to propagate gtk3 at all, or librsvg as a native build input. This also means we can get rid of wrapGAppsHook4, as it's now identical to wrapGAppsHook.
It's finally time to do this, because I noticed the extra gtk build input was breaking cross compilation of gcr_4.
Draft while I search for build regressions.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)