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