From f26abaa2ef8d4f17d79ef60a4f4a1389d840b7f8 Mon Sep 17 00:00:00 2001 From: Noah Fontes Date: Fri, 13 May 2022 18:53:50 -0700 Subject: [PATCH] electron: (mostly) remove dependency on libXss.so Electron 10, which is built from Chromium 85.0.4183.84, no longer depends on libXScrnSaver. This was removed from Chromium upstream in revision 782094 (https://chromium-review.googlesource.com/c/chromium/src/+/2261490), which landed in Chromium 85.0.4182.0 (https://storage.googleapis.com/chromium-find-releases-static/aa5.html#aa5c637805cd33366f2181ed6ec54e0ed174a6f9). This change removes the LD_PRELOAD of libXss.so.1 and simply includes libXScrnSaver in the rpath for Electron versions prior to 10.0.0. --- pkgs/development/tools/electron/generic.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/electron/generic.nix b/pkgs/development/tools/electron/generic.nix index 05d9facf60b..72cce135e04 100644 --- a/pkgs/development/tools/electron/generic.nix +++ b/pkgs/development/tools/electron/generic.nix @@ -63,6 +63,7 @@ let electronLibPath = with lib; makeLibraryPath ( [ libuuid at-spi2-atk at-spi2-core libappindicator-gtk3 ] ++ optionals (versionAtLeast version "9.0.0") [ libdrm mesa ] + ++ optionals (versionOlder version "10.0.0") [ libXScrnSaver ] ++ optionals (versionAtLeast version "11.0.0") [ libxkbcommon ] ++ optionals (versionAtLeast version "12.0.0") [ libxshmfence ] ++ optionals (versionAtLeast version "17.0.0") [ libglvnd ] @@ -95,9 +96,7 @@ let $out/lib/electron/electron \ ${lib.optionalString (lib.versionAtLeast version "15.0.0") "$out/lib/electron/chrome_crashpad_handler" } - wrapProgram $out/lib/electron/electron \ - --prefix LD_PRELOAD : ${lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \ - "''${gappsWrapperArgs[@]}" + wrapProgram $out/lib/electron/electron "''${gappsWrapperArgs[@]}" ''; };