Fix electron crash when using file chooser dialog (#55057)

Fix electron crash when using file chooser dialog
This commit is contained in:
Jörg Thalheim 2019-06-25 07:59:31 +01:00 committed by GitHub
commit b552d72a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 9 deletions

View File

@ -1,6 +1,5 @@
{ stdenv, newScope, makeWrapper { stdenv, newScope, makeWrapper
, wrapGAppsHook, gnome3, glib , electron, xdg_utils, makeDesktopItem
, electron_3, xdg_utils, makeDesktopItem
, auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU" , auth0ClientID ? "0spuNKfIGeLAQ_Iki9t3fGxbfJl3k8SU"
, auth0Domain ? "nixpkgs.auth0.com" }: , auth0Domain ? "nixpkgs.auth0.com" }:
@ -28,9 +27,8 @@ with self;
stdenv.mkDerivation { stdenv.mkDerivation {
name = "rambox-${rambox-bare.version}"; name = "rambox-${rambox-bare.version}";
nativeBuildInputs = [ makeWrapper wrapGAppsHook ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ glib gnome3.gsettings_desktop_schemas ];
unpackPhase = ":"; unpackPhase = ":";
dontWrapGApps = true; # we only want $gappsWrapperArgs here dontWrapGApps = true; # we only want $gappsWrapperArgs here
@ -43,9 +41,8 @@ stdenv.mkDerivation {
''; '';
postFixup = '' postFixup = ''
makeWrapper ${electron_3}/bin/electron $out/bin/rambox \ makeWrapper ${electron}/bin/electron $out/bin/rambox \
--add-flags "${rambox-bare} --without-update" \ --add-flags "${rambox-bare} --without-update" \
"''${gappsWrapperArgs[@]}" \
--prefix PATH : ${xdg_utils}/bin --prefix PATH : ${xdg_utils}/bin
''; '';

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 let
version = "4.1.5"; version = "4.1.5";
@ -35,7 +35,15 @@ let
}; };
}.${stdenv.hostPlatform.system} or throwSystem; }.${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 = '' buildCommand = ''
mkdir -p $out/lib/electron $out/bin mkdir -p $out/lib/electron $out/bin
@ -50,7 +58,8 @@ let
$out/lib/electron/electron $out/lib/electron/electron
wrapProgram $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[@]}"
''; '';
}; };