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.

+18 -19
+18 -19
pkgs/applications/networking/browsers/google-chrome/default.nix
··· 7 7 , dbus_libs, gtk, gdk_pixbuf, gcc 8 8 9 9 # Will crash without. 10 - , udev 10 + , libudev 11 11 12 12 # Loaded at runtime. 13 13 , libexif ··· 39 39 withCustomModes = true; 40 40 }; 41 41 42 - env = buildEnv { 43 - name = "google-chrome-env"; 44 - paths = [ 45 - glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr 46 - libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite 47 - alsaLib libXdamage libXtst libXrandr expat cups 48 - dbus_libs gtk gdk_pixbuf gcc 49 - udev 50 - libexif 51 - liberation_ttf curl utillinux xdg_utils wget 52 - flac harfbuzz icu libpng opusWithCustomModes snappy speechd 53 - bzip2 libcap 54 - ] 55 - ++ optional pulseSupport libpulseaudio; 56 - }; 42 + deps = [ 43 + stdenv.cc.cc 44 + glib fontconfig freetype pango cairo libX11 libXi atk gconf nss nspr 45 + libXcursor libXext libXfixes libXrender libXScrnSaver libXcomposite 46 + alsaLib libXdamage libXtst libXrandr expat cups 47 + dbus_libs gtk gdk_pixbuf gcc 48 + libudev 49 + libexif 50 + liberation_ttf curl utillinux xdg_utils wget 51 + flac harfbuzz icu libpng opusWithCustomModes snappy speechd 52 + bzip2 libcap 53 + ] ++ optional pulseSupport libpulseaudio; 57 54 in stdenv.mkDerivation rec { 58 55 inherit version; 59 56 ··· 61 58 62 59 src = binary; 63 60 64 - buildInputs = [ env patchelf ]; 61 + buildInputs = [ patchelf ]; 65 62 66 63 unpackPhase = '' 67 64 ar x $src 68 65 tar xf data.tar.xz 69 66 ''; 70 67 68 + rpath = makeLibraryPath deps; 69 + binpath = makeBinPath deps; 70 + 71 71 installPhase = '' 72 72 case ${channel} in 73 73 beta) appname=chrome-beta dist=beta ;; ··· 76 76 esac 77 77 78 78 exe=$out/bin/google-chrome-$dist 79 - rpath="${env}/lib:${env}/lib64" 80 79 81 80 mkdir -p $out/bin $out/share 82 81 ··· 103 102 cat > $exe << EOF 104 103 #!${bash}/bin/sh 105 104 export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} 106 - export PATH=${env}/bin\''${PATH:+:\$PATH} 105 + export PATH=$binpath\''${PATH:+:\$PATH} 107 106 $out/share/google/$appname/google-$appname "\$@" 108 107 EOF 109 108 chmod +x $exe