firefox: don't include xdg-open and other linux-specific dependencies in wrapped closure on darwin (#395917)

authored by Martin Weinelt and committed by GitHub c7d38f9f 8c762043

+15 -11
+15 -11
pkgs/applications/networking/browsers/firefox/wrapper.nix
··· 49 49 wmClass ? applicationName, 50 50 nativeMessagingHosts ? [ ], 51 51 pkcs11Modules ? [ ], 52 - useGlvnd ? true, 52 + useGlvnd ? (!isDarwin), 53 53 cfg ? config.${applicationName} or { }, 54 54 55 55 ## Following options are needed for extra prefs & policies ··· 109 109 zlib 110 110 ] 111 111 ) 112 - ++ lib.optional (config.pulseaudio or true) libpulseaudio 112 + ++ lib.optional (config.pulseaudio or (!isDarwin)) libpulseaudio 113 113 ++ lib.optional alsaSupport alsa-lib 114 114 ++ lib.optional sndioSupport sndio 115 115 ++ lib.optional jackSupport libjack2 116 116 ++ lib.optional smartcardSupport opensc 117 117 ++ pkcs11Modules 118 - ++ gtk_modules; 118 + ++ lib.optionals (!isDarwin) gtk_modules; 119 119 gtk_modules = [ libcanberra-gtk3 ]; 120 120 121 121 # Darwin does not rename bundled binaries ··· 289 289 lndir 290 290 jq 291 291 ]; 292 - buildInputs = [ browser.gtk3 ]; 292 + buildInputs = lib.optionals (!isDarwin) [ browser.gtk3 ]; 293 293 294 294 makeWrapperArgs = 295 295 [ ··· 297 297 "LD_LIBRARY_PATH" 298 298 ":" 299 299 "${finalAttrs.libs}" 300 - 301 - "--suffix" 302 - "GTK_PATH" 303 - ":" 304 - "${lib.concatStringsSep ":" finalAttrs.gtk_modules}" 305 300 306 301 "--suffix" 307 302 "PATH" ··· 319 314 "--set" 320 315 "MOZ_ALLOW_DOWNGRADE" 321 316 "1" 317 + ] 318 + ++ lib.optionals (!isDarwin) [ 319 + "--suffix" 320 + "GTK_PATH" 321 + ":" 322 + "${lib.concatStringsSep ":" finalAttrs.gtk_modules}" 322 323 323 324 "--suffix" 324 325 "XDG_DATA_DIRS" ··· 330 331 "1" 331 332 332 333 ] 333 - ++ lib.optionals (!xdg-utils.meta.broken) [ 334 + ++ lib.optionals (!xdg-utils.meta.broken && !isDarwin) [ 334 335 # make xdg-open overridable at runtime 335 336 "--suffix" 336 337 "PATH" ··· 457 458 oldExe="$executablePrefix/.${applicationName}"-old 458 459 mv "$executablePath" "$oldExe" 459 460 fi 460 - 461 + '' 462 + + lib.optionalString (!isDarwin) '' 461 463 appendToVar makeWrapperArgs --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" 464 + '' 465 + + '' 462 466 concatTo makeWrapperArgs oldWrapperArgs 463 467 464 468 makeWrapper "$oldExe" "$out/${finalBinaryPath}" "''${makeWrapperArgs[@]}"