Skip to content

Commit

Permalink
electron: fix wrapGAppsHook usage
Browse files Browse the repository at this point in the history
(cherry picked from commit 96f52cb)
  • Loading branch information
prusnak authored and worldofpeace committed Apr 13, 2020
1 parent 3ad8596 commit 22b5a32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkgs/development/tools/electron/default.nix
@@ -1,4 +1,4 @@
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core }@args:
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, glib, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core }@args:

let
mkElectron = import ./generic.nix args;
Expand Down
13 changes: 8 additions & 5 deletions pkgs/development/tools/electron/generic.nix
@@ -1,4 +1,4 @@
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core}:
{ stdenv, libXScrnSaver, makeWrapper, fetchurl, wrapGAppsHook, glib, gtk3, unzip, atomEnv, libuuid, at-spi2-atk, at-spi2-core}:

version: hashes:
let
Expand Down Expand Up @@ -34,7 +34,7 @@ let
};

linux = {
buildInputs = [ gtk3 ];
buildInputs = [ glib gtk3 ];

nativeBuildInputs = [
unzip
Expand All @@ -44,13 +44,16 @@ let

dontWrapGApps = true; # electron is in lib, we need to wrap it manually

buildCommand = ''
dontUnpack = true;
dontBuild = true;

installPhase = ''
mkdir -p $out/lib/electron $out/bin
unzip -d $out/lib/electron $src
ln -s $out/lib/electron/electron $out/bin
'';

fixupPhase
postFixup = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk at-spi2-core ]}:$out/lib/electron" \
Expand Down

0 comments on commit 22b5a32

Please sign in to comment.