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
|
{ lib, stdenv, pkgconfig, pango, perl, python2, python3, zip
|
||||||
, libjpeg, zlib, dbus, dbus-glib, bzip2, xorg
|
, 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
|
, yasm, libGLU, libGL, sqlite, unzip, makeWrapper
|
||||||
, hunspell, libXdamage, libevent, libstartup_notification
|
, hunspell, libXdamage, libevent, libstartup_notification
|
||||||
, libvpx_1_8
|
, libvpx_1_8
|
||||||
@ -157,7 +157,7 @@ buildStdenv.mkDerivation ({
|
|||||||
gtk2 perl zip libjpeg zlib bzip2
|
gtk2 perl zip libjpeg zlib bzip2
|
||||||
dbus dbus-glib pango freetype fontconfig xorg.libXi xorg.libXcursor
|
dbus dbus-glib pango freetype fontconfig xorg.libXi xorg.libXcursor
|
||||||
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
|
xorg.libX11 xorg.libXrender xorg.libXft xorg.libXt file
|
||||||
libnotify xorg.pixman yasm libGLU libGL
|
xorg.pixman yasm libGLU libGL
|
||||||
xorg.xorgproto
|
xorg.xorgproto
|
||||||
xorg.libXext unzip makeWrapper
|
xorg.libXext unzip makeWrapper
|
||||||
libevent libstartup_notification /* cairo */
|
libevent libstartup_notification /* cairo */
|
||||||
@ -336,18 +336,6 @@ buildStdenv.mkDerivation ({
|
|||||||
gappsWrapperArgs+=(--argv0 "$out/bin/.${binaryName}-wrapped")
|
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;
|
doInstallCheck = true;
|
||||||
installCheckPhase = ''
|
installCheckPhase = ''
|
||||||
# Some basic testing
|
# Some basic testing
|
||||||
@ -360,6 +348,7 @@ buildStdenv.mkDerivation ({
|
|||||||
isFirefox3Like = true;
|
isFirefox3Like = true;
|
||||||
gtk = gtk2;
|
gtk = gtk2;
|
||||||
inherit alsaSupport;
|
inherit alsaSupport;
|
||||||
|
inherit pipewireSupport;
|
||||||
inherit nspr;
|
inherit nspr;
|
||||||
inherit ffmpegSupport;
|
inherit ffmpegSupport;
|
||||||
inherit gssSupport;
|
inherit gssSupport;
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
## various stuff that can be plugged in
|
## various stuff that can be plugged in
|
||||||
, flashplayer, hal-flash
|
, flashplayer, hal-flash
|
||||||
, ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd
|
, ffmpeg, xorg, alsaLib, libpulseaudio, libcanberra-gtk2, libglvnd, libnotify
|
||||||
, gnome3/*.gnome-shell*/
|
, gnome3/*.gnome-shell*/
|
||||||
, browserpass, chrome-gnome-shell, uget-integrator, plasma5, bukubrow
|
, browserpass, chrome-gnome-shell, uget-integrator, plasma5, bukubrow, pipewire
|
||||||
, tridactyl-native
|
, tridactyl-native
|
||||||
, fx_cast_bridge
|
, fx_cast_bridge
|
||||||
, udev
|
, udev
|
||||||
@ -51,6 +51,7 @@ let
|
|||||||
ffmpegSupport = browser.ffmpegSupport or false;
|
ffmpegSupport = browser.ffmpegSupport or false;
|
||||||
gssSupport = browser.gssSupport or false;
|
gssSupport = browser.gssSupport or false;
|
||||||
alsaSupport = browser.alsaSupport or false;
|
alsaSupport = browser.alsaSupport or false;
|
||||||
|
pipewireSupport = browser.pipewireSupport or false;
|
||||||
|
|
||||||
plugins =
|
plugins =
|
||||||
let
|
let
|
||||||
@ -80,7 +81,8 @@ let
|
|||||||
++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge
|
++ lib.optional (cfg.enableFXCastBridge or false) fx_cast_bridge
|
||||||
++ extraNativeMessagingHosts
|
++ 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 ffmpegSupport ffmpeg
|
||||||
++ lib.optional gssSupport kerberos
|
++ lib.optional gssSupport kerberos
|
||||||
++ lib.optional useGlvnd libglvnd
|
++ lib.optional useGlvnd libglvnd
|
||||||
|
Loading…
Reference in New Issue
Block a user