diff options
author | Sarunas Valaskevicius <rakatan@gmail.com> | 2019-02-01 18:50:00 +0000 |
---|---|---|
committer | Sarunas Valaskevicius <rakatan@gmail.com> | 2019-06-19 20:31:52 +0100 |
commit | bf36d566fc735200af6275552214e1ef98809ecd (patch) | |
tree | 3ee8e9b6e100161edefe3595000e19d5ec83bec7 /pkgs/development | |
parent | cfe6277e62f66a554f92c33f6bbcaf72e55d5c90 (diff) |
electron: fix electron crash when using file chooser dialog
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/electron/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/tools/electron/default.nix b/pkgs/development/tools/electron/default.nix index 5a00a883f512..c45c41fc89cd 100644 --- a/pkgs/development/tools/electron/default.nix +++ b/pkgs/development/tools/electron/default.nix @@ -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[@]}" ''; }; |