chrome: fix fallout from #26512
Fixes broken save dialogue (causes chrome to crash) and missing icons.
This commit is contained in:
parent
8a8f0408cd
commit
39fd944402
@ -1,4 +1,5 @@
|
||||
{ newScope, stdenv, makeWrapper, makeDesktopItem, ed
|
||||
, glib, gtk2, gtk3, gnome2, gnome3, gsettings_desktop_schemas
|
||||
|
||||
# package customization
|
||||
, channel ? "stable"
|
||||
@ -62,10 +63,26 @@ let
|
||||
|
||||
sandboxExecutableName = chromium.browser.passthru.sandboxExecutableName;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "chromium${suffix}-${chromium.browser.version}";
|
||||
version = chromium.browser.version;
|
||||
|
||||
buildInputs = [ makeWrapper ed ];
|
||||
inherit (stdenv.lib) versionAtLeast;
|
||||
|
||||
gtk = if (versionAtLeast version "59.0.0.0") then gtk3 else gtk2;
|
||||
gnome = if (versionAtLeast version "59.0.0.0") then gnome3 else gnome2;
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "chromium${suffix}-${version}";
|
||||
inherit version;
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper ed
|
||||
|
||||
# needed for GSETTINGS_SCHEMAS_PATH
|
||||
gsettings_desktop_schemas glib gtk
|
||||
|
||||
# needed for XDG_ICON_DIRS
|
||||
gnome.defaultIconTheme
|
||||
];
|
||||
|
||||
outputs = ["out" "sandbox"];
|
||||
|
||||
@ -92,6 +109,8 @@ in stdenv.mkDerivation {
|
||||
# libredirect causes chromium to deadlock on startup
|
||||
export LD_PRELOAD="\$(echo -n "\$LD_PRELOAD" | tr ':' '\n' | grep -v /lib/libredirect\\\\.so$ | tr '\n' ':')"
|
||||
|
||||
export XDG_DATA_DIRS=$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH\''${XDG_DATA_DIRS:+:}\$XDG_DATA_DIRS
|
||||
|
||||
.
|
||||
w
|
||||
EOF
|
||||
@ -107,7 +126,7 @@ in stdenv.mkDerivation {
|
||||
cp -v "${desktopItem}/share/applications/"* "$out/share/applications"
|
||||
'';
|
||||
|
||||
inherit (chromium.browser) meta packageName version;
|
||||
inherit (chromium.browser) meta packageName;
|
||||
|
||||
passthru = {
|
||||
inherit (chromium) upstream-info browser;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user