google-chrome: Fix regression from closure-size merge.

Fixes #14695

I'm not entirely sure if including `stdenv.cc.cc` in `makeLibraryPath`
is the correct thing to do here. If it's incorrect, please feel free to
ping me.
This commit is contained in:
Moritz Ulrich 2016-04-14 18:53:13 +02:00
parent 73fba62fb1
commit 0c5ed43cd4

View File

@ -7,7 +7,7 @@
, dbus_libs, gtk, gdk_pixbuf, gcc , dbus_libs, gtk, gdk_pixbuf, gcc
# Will crash without. # Will crash without.
, udev , libudev
# Loaded at runtime. # Loaded at runtime.
, libexif , libexif
@ -39,21 +39,18 @@ let
withCustomModes = true; withCustomModes = true;
}; };
env = buildEnv { deps = [
name = "google-chrome-env"; stdenv.cc.cc
paths = [ glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr
glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite
libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite alsaLib libXdamage libXtst libXrandr expat cups
alsaLib libXdamage libXtst libXrandr expat cups dbus_libs gtk gdk_pixbuf gcc
dbus_libs gtk gdk_pixbuf gcc libudev
udev libexif
libexif liberation_ttf curl utillinux xdg_utils wget
liberation_ttf curl utillinux xdg_utils wget flac harfbuzz icu libpng opusWithCustomModes snappy speechd
flac harfbuzz icu libpng opusWithCustomModes snappy speechd bzip2 libcap
bzip2 libcap ] ++ optional pulseSupport libpulseaudio;
]
++ optional pulseSupport libpulseaudio;
};
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
inherit version; inherit version;
@ -61,13 +58,16 @@ in stdenv.mkDerivation rec {
src = binary; src = binary;
buildInputs = [ env patchelf ]; buildInputs = [ patchelf ];
unpackPhase = '' unpackPhase = ''
ar x $src ar x $src
tar xf data.tar.xz tar xf data.tar.xz
''; '';
rpath = makeLibraryPath deps;
binpath = makeBinPath deps;
installPhase = '' installPhase = ''
case ${channel} in case ${channel} in
beta) appname=chrome-beta dist=beta ;; beta) appname=chrome-beta dist=beta ;;
@ -76,7 +76,6 @@ in stdenv.mkDerivation rec {
esac esac
exe=$out/bin/google-chrome-$dist exe=$out/bin/google-chrome-$dist
rpath="${env}/lib:${env}/lib64"
mkdir -p $out/bin $out/share mkdir -p $out/bin $out/share
@ -103,7 +102,7 @@ in stdenv.mkDerivation rec {
cat > $exe << EOF cat > $exe << EOF
#!${bash}/bin/sh #!${bash}/bin/sh
export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH}
export PATH=${env}/bin\''${PATH:+:\$PATH} export PATH=$binpath\''${PATH:+:\$PATH}
$out/share/google/$appname/google-$appname "\$@" $out/share/google/$appname/google-$appname "\$@"
EOF EOF
chmod +x $exe chmod +x $exe