firefox: remove patchelf usage
Firefox has a number of optional dependencies that get dlopened. Instead of using patchelf to set the RPATH use LD_LIBRARY_PATH. The motivation for this is we already set LD_LIBRARY_PATH in the wrapper on Linux.
This commit is contained in:
parent
80e863c52c
commit
a277fca1c4
|
@ -4,7 +4,7 @@
|
|||
|
||||
{ lib, stdenv, pkgconfig, pango, perl, python2, python3, zip
|
||||
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
|
||||
, freetype, fontconfig, file, nspr, nss, nss_3_53, libnotify
|
||||
, freetype, fontconfig, file, nspr, nss, nss_3_53
|
||||
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
|
||||
, hunspell, libXdamage, libevent, libstartup_notification
|
||||
, libvpx_1_8
|
||||
|
@ -157,7 +157,7 @@ buildStdenv.mkDerivation ({
|
|||
gtk2 perl zip libjpeg zlib bzip2
|
||||
dbus dbus-glib pango freetype fontconfig xorg.libXi xorg.libXcursor
|
||||
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
|
||||
libnotify xorg.pixman yasm libGLU libGL
|
||||
xorg.pixman yasm libGLU libGL
|
||||
xorg.xorgproto
|
||||
xorg.libXext unzip makeWrapper
|
||||
libevent libstartup_notification /* cairo */
|
||||
|
@ -336,18 +336,6 @@ buildStdenv.mkDerivation ({
|
|||
gappsWrapperArgs+=(--argv0 "$out/bin/.${binaryName}-wrapped")
|
||||
'';
|
||||
|
||||
postFixup = lib.optionalString buildStdenv.isLinux ''
|
||||
# Fix notifications. LibXUL uses dlopen for this, unfortunately; see #18712.
|
||||
patchelf --set-rpath "${lib.getLib libnotify
|
||||
}/lib:$(patchelf --print-rpath "$out"/lib/${binaryName}*/libxul.so)" \
|
||||
"$out"/lib/${binaryName}*/libxul.so
|
||||
patchelf --add-needed ${xorg.libXScrnSaver.out}/lib/libXss.so $out/lib/${binaryName}/${binaryName}
|
||||
${lib.optionalString (pipewireSupport && lib.versionAtLeast ffversion "83") ''
|
||||
patchelf --add-needed "${lib.getLib pipewire}/lib/libpipewire-0.3.so" \
|
||||
"$out"/lib/${binaryName}/${binaryName}
|
||||
''}
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
# Some basic testing
|
||||
|
@ -360,6 +348,7 @@ buildStdenv.mkDerivation ({
|
|||
isFirefox3Like = true;
|
||||
gtk = gtk2;
|
||||
inherit alsaSupport;
|
||||
inherit pipewireSupport;
|
||||
inherit nspr;
|
||||
inherit ffmpegSupport;
|
||||
inherit gssSupport;
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
## various stuff that can be plugged in
|
||||
, flashplayer, hal-flash
|
||||
, ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd
|
||||
, ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd, libnotify
|
||||
, gnome3/*.gnome-shell*/
|
||||
, browserpass, chrome-gnome-shell, uget-integrator, plasma5, bukubrow
|
||||
, browserpass, chrome-gnome-shell, uget-integrator, plasma5, bukubrow, pipewire
|
||||
, tridactyl-native
|
||||
, fx_cast_bridge
|
||||
, udev
|
||||
|
@ -51,6 +51,7 @@ let
|
|||
ffmpegSupport = browser.ffmpegSupport or false;
|
||||
gssSupport = browser.gssSupport or false;
|
||||
alsaSupport = browser.alsaSupport or false;
|
||||
pipewireSupport = browser.pipewireSupport or false;
|
||||
|
||||
plugins =
|
||||
let
|
||||
|
@ -80,7 +81,8 @@ let
|
|||
++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge
|
||||
++ extraNativeMessagingHosts
|
||||
);
|
||||
libs = lib.optionals stdenv.isLinux [ udev libva mesa ]
|
||||
libs = lib.optionals stdenv.isLinux [ udev libva mesa libnotify xorg.libXScrnSaver ]
|
||||
++ lib.optional (pipewireSupport && lib.versionAtLeast version "83") pipewire
|
||||
++ lib.optional ffmpegSupport ffmpeg
|
||||
++ lib.optional gssSupport kerberos
|
||||
++ lib.optional useGlvnd libglvnd
|
||||
|
|
Loading…
Reference in New Issue