firefox/wrapper: inject gsettings schema paths into XDG_DATA_DIRS (#546288)

This commit is contained in:
Ihar Hrachyshka
2026-07-28 00:21:07 +00:00
committed by GitHub

View File

@@ -6,6 +6,7 @@
lndir,
config,
buildPackages,
gsettings-desktop-schemas,
jq,
xdg-utils,
writeText,
@@ -134,6 +135,12 @@ let
++ pkcs11Modules
++ lib.optionals (!isDarwin) gtk_modules;
gtk_modules = lib.optionals (!isDarwin) [ libcanberra-gtk3 ];
# strictDeps prevents buildInputs from populating GSETTINGS_SCHEMAS_PATH.
# Revert when https://github.com/NixOS/nixpkgs/pull/546281 hits stable.
gsettingsSchemaPaths = lib.optionals (!isDarwin) [
"${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
"${browser.gtk3}/share/gsettings-schemas/${browser.gtk3.name}"
];
# Darwin does not rename bundled binaries
launcherName = "${applicationName}${lib.optionalString (!isDarwin) nameSuffix}";
@@ -339,6 +346,11 @@ let
":"
"${adwaita-icon-theme}/share"
"--prefix"
"XDG_DATA_DIRS"
":"
(lib.concatStringsSep ":" gsettingsSchemaPaths)
"--set-default"
"MOZ_ENABLE_WAYLAND"
"1"
@@ -486,9 +498,6 @@ let
mv "$executablePath" "$oldExe"
fi
''
+ lib.optionalString (!isDarwin) ''
appendToVar makeWrapperArgs --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
''
+ ''
concatTo makeWrapperArgs oldWrapperArgs