From 2893902201e2cb2cebaaf3a8da61622675f20887 Mon Sep 17 00:00:00 2001 From: K900 Date: Sat, 30 Sep 2023 10:27:32 +0300 Subject: [PATCH] firefox-bin: remove workaround --- .../browsers/firefox-bin/default.nix | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox-bin/default.nix b/pkgs/applications/networking/browsers/firefox-bin/default.nix index 8130f9f775849..59c87321da347 100644 --- a/pkgs/applications/networking/browsers/firefox-bin/default.nix +++ b/pkgs/applications/networking/browsers/firefox-bin/default.nix @@ -20,7 +20,6 @@ , runtimeShell , systemLocale ? config.i18n.defaultLocale or "en_US" , patchelfUnstable # have to use patchelfUnstable to support --no-clobber-old-sections -, makeWrapper }: let @@ -58,20 +57,6 @@ let source = lib.findFirst (sourceMatches mozLocale) defaultSource sources; pname = "firefox-${channel}-bin-unwrapped"; - - # FIXME: workaround for not being able to pass flags to patchelf - # Remove after https://github.com/NixOS/nixpkgs/pull/256525 - wrappedPatchelf = stdenv.mkDerivation { - pname = "patchelf-wrapped"; - inherit (patchelfUnstable) version; - - nativeBuildInputs = [ makeWrapper ]; - - buildCommand = '' - mkdir -p $out/bin - makeWrapper ${patchelfUnstable}/bin/patchelf $out/bin/patchelf --append-flags "--no-clobber-old-sections" - ''; - }; in stdenv.mkDerivation { @@ -79,7 +64,7 @@ stdenv.mkDerivation { src = fetchurl { inherit (source) url sha256; }; - nativeBuildInputs = [ wrapGAppsHook autoPatchelfHook wrappedPatchelf ]; + nativeBuildInputs = [ wrapGAppsHook autoPatchelfHook patchelfUnstable ]; buildInputs = [ gtk3 adwaita-icon-theme @@ -95,6 +80,8 @@ stdenv.mkDerivation { appendRunpaths = [ "${pipewire.lib}/lib" ]; + # Firefox uses "relrhack" to manually process relocations from a fixed offset + patchelfFlags = [ "--no-clobber-old-sections" ]; installPhase = ''