electron: fix electron crash when using file chooser dialog

This commit is contained in:
Sarunas Valaskevicius 2019-02-01 18:50:00 +00:00
parent cfe6277e62
commit bf36d566fc

View File

@ -1,4 +1,4 @@
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, unzip, atomEnv, libuuid, at-spi2-atk }:
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk }:
let
version = "4.0.0";
@ -36,7 +36,15 @@ let
};
}.${stdenv.hostPlatform.system} or throwSystem;
buildInputs = [ unzip makeWrapper ];
buildInputs = [ gtk3 ];
nativeBuildInputs = [
unzip
makeWrapper
wrapGAppsHook
];
dontWrapGApps = true; # electron is in lib, we need to wrap it manually
buildCommand = ''
mkdir -p $out/lib/electron $out/bin
@ -51,7 +59,8 @@ let
$out/lib/electron/electron
wrapProgram $out/lib/electron/electron \
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1
--prefix LD_PRELOAD : ${stdenv.lib.makeLibraryPath [ libXScrnSaver ]}/libXss.so.1 \
"''${gappsWrapperArgs[@]}"
'';
};