Merge pull request #172961 from impl/remove-electron-ld-preload

electron: (mostly) remove dependency on libXss.so
This commit is contained in:
Pavol Rusnak 2022-05-15 19:50:22 +02:00 committed by GitHub
commit a90ecf7856
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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[@]}"
'';
};