diff options
Diffstat (limited to 'pkgs/applications/networking/browsers/firefox/wrapper.nix')
| -rw-r--r-- | pkgs/applications/networking/browsers/firefox/wrapper.nix | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index f6244310858a..f2e7b430f825 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -49,7 +49,7 @@ let wmClass ? applicationName, nativeMessagingHosts ? [ ], pkcs11Modules ? [ ], - useGlvnd ? true, + useGlvnd ? (!isDarwin), cfg ? config.${applicationName} or { }, ## Following options are needed for extra prefs & policies @@ -109,13 +109,13 @@ let zlib ] ) - ++ lib.optional (config.pulseaudio or true) libpulseaudio + ++ lib.optional (config.pulseaudio or (!isDarwin)) libpulseaudio ++ lib.optional alsaSupport alsa-lib ++ lib.optional sndioSupport sndio ++ lib.optional jackSupport libjack2 ++ lib.optional smartcardSupport opensc ++ pkcs11Modules - ++ gtk_modules; + ++ lib.optionals (!isDarwin) gtk_modules; gtk_modules = [ libcanberra-gtk3 ]; # Darwin does not rename bundled binaries @@ -289,7 +289,7 @@ let lndir jq ]; - buildInputs = [ browser.gtk3 ]; + buildInputs = lib.optionals (!isDarwin) [ browser.gtk3 ]; makeWrapperArgs = [ @@ -299,11 +299,6 @@ let "${finalAttrs.libs}" "--suffix" - "GTK_PATH" - ":" - "${lib.concatStringsSep ":" finalAttrs.gtk_modules}" - - "--suffix" "PATH" ":" "${placeholder "out"}/bin" @@ -319,6 +314,12 @@ let "--set" "MOZ_ALLOW_DOWNGRADE" "1" + ] + ++ lib.optionals (!isDarwin) [ + "--suffix" + "GTK_PATH" + ":" + "${lib.concatStringsSep ":" finalAttrs.gtk_modules}" "--suffix" "XDG_DATA_DIRS" @@ -330,7 +331,7 @@ let "1" ] - ++ lib.optionals (!xdg-utils.meta.broken) [ + ++ lib.optionals (!xdg-utils.meta.broken && !isDarwin) [ # make xdg-open overridable at runtime "--suffix" "PATH" @@ -457,8 +458,11 @@ let oldExe="$executablePrefix/.${applicationName}"-old mv "$executablePath" "$oldExe" fi - + '' + + lib.optionalString (!isDarwin) '' appendToVar makeWrapperArgs --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" + '' + + '' concatTo makeWrapperArgs oldWrapperArgs makeWrapper "$oldExe" "$out/${finalBinaryPath}" "''${makeWrapperArgs[@]}" @@ -483,7 +487,7 @@ let done fi - install -D -t $out/share/applications $desktopItem/share/applications/* + install -m 644 -D -t $out/share/applications $desktopItem/share/applications/* '' + lib.optionalString hasMozSystemDirPatch '' |
