3
0
Fork 0
forked from mirrors/nixpkgs

electron: fix wrapGAppsHook usage

This commit is contained in:
Pavol Rusnak 2020-04-11 12:25:51 +02:00
parent 3abd151f8e
commit 96f52cb22b
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D
2 changed files with 9 additions and 6 deletions

View file

@ -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 let
mkElectron = import ./generic.nix args; mkElectron = import ./generic.nix args;

View file

@ -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: version: hashes:
let let
@ -34,7 +34,7 @@ let
}; };
linux = { linux = {
buildInputs = [ gtk3 ]; buildInputs = [ glib gtk3 ];
nativeBuildInputs = [ nativeBuildInputs = [
unzip unzip
@ -44,13 +44,16 @@ let
dontWrapGApps = true; # electron is in lib, we need to wrap it manually 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 mkdir -p $out/lib/electron $out/bin
unzip -d $out/lib/electron $src unzip -d $out/lib/electron $src
ln -s $out/lib/electron/electron $out/bin ln -s $out/lib/electron/electron $out/bin
'';
fixupPhase postFixup = ''
patchelf \ patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --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" \ --set-rpath "${atomEnv.libPath}:${stdenv.lib.makeLibraryPath [ libuuid at-spi2-atk at-spi2-core ]}:$out/lib/electron" \