chrome: fix fallout from #26512
Fixes broken save dialogue (causes chrome to crash) and missing icons.
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
|
||||
# Only needed for getting information about upstream binaries
|
||||
, chromium
|
||||
|
||||
, gsettings_desktop_schemas
|
||||
, gnome2, gnome3
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
@@ -42,6 +45,9 @@ let
|
||||
withCustomModes = true;
|
||||
};
|
||||
|
||||
gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
|
||||
gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
|
||||
|
||||
deps = [
|
||||
glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
|
||||
libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite libxcb
|
||||
@@ -53,7 +59,7 @@ let
|
||||
flac harfbuzz icu libpng opusWithCustomModes snappy speechd
|
||||
bzip2 libcap
|
||||
] ++ optional pulseSupport libpulseaudio
|
||||
++ (if (versionAtLeast version "59.0.0.0") then [gtk3] else [gtk2]);
|
||||
++ [ gtk ];
|
||||
|
||||
suffix = if channel != "stable" then "-" + channel else "";
|
||||
|
||||
@@ -64,7 +70,15 @@ in stdenv.mkDerivation rec {
|
||||
|
||||
src = binary;
|
||||
|
||||
buildInputs = [ patchelf ];
|
||||
buildInputs = [
|
||||
patchelf
|
||||
|
||||
# needed for GSETTINGS_SCHEMAS_PATH
|
||||
gsettings_desktop_schemas glib gtk
|
||||
|
||||
# needed for XDG_ICON_DIRS
|
||||
gnome.defaultIconTheme
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
ar x $src
|
||||
@@ -109,6 +123,7 @@ in stdenv.mkDerivation rec {
|
||||
#!${bash}/bin/sh
|
||||
export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
|
||||
export PATH=$binpath\''${PATH:+:\$PATH}
|
||||
export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
|
||||
$out/share/google/$appname/google-$appname ${commandLineArgs} "\$@"
|
||||
EOF
|
||||
chmod +x $exe
|
||||
|
||||
Reference in New Issue
Block a user