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