3
0
Fork 0
forked from mirrors/nixpkgs

chromium, google-chrome: fix escaping of commandLineArgs

This commit is contained in:
volth 2018-03-06 13:00:14 +00:00
parent 91280690af
commit 96ebf614ad
2 changed files with 8 additions and 11 deletions

View file

@ -90,7 +90,7 @@ in stdenv.mkDerivation {
mkdir -p "$out/bin"
eval makeWrapper "${browserBinary}" "$out/bin/chromium" \
${commandLineArgs} \
--add-flags ${escapeShellArg (escapeShellArg commandLineArgs)} \
${concatMapStringsSep " " getWrapperFlags chromium.plugins.enabled}
ed -v -s "$out/bin/chromium" << EOF

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, patchelf, bash
{ stdenv, fetchurl, patchelf, makeWrapper
# Linked dynamic libraries.
, glib, fontconfig, freetype, pango, cairo, libX11, libXi, atk, gconf, nss, nspr
@ -72,7 +72,7 @@ in stdenv.mkDerivation rec {
src = chromium.upstream-info.binary;
buildInputs = [
patchelf
patchelf makeWrapper
# needed for GSETTINGS_SCHEMAS_PATH
gsettings-desktop-schemas glib gtk
@ -120,14 +120,11 @@ in stdenv.mkDerivation rec {
mv "$icon_file" "$logo_output_path/google-$appname.png"
done
cat > $exe << EOF
#!${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
makeWrapper "$out/share/google/$appname/google-$appname" "$exe" \
--prefix LD_LIBRARY_PATH : "$rpath" \
--prefix PATH : "$binpath" \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS:$GSETTINGS_SCHEMAS_PATH" \
--add-flags ${escapeShellArg commandLineArgs}
for elf in $out/share/google/$appname/{chrome,chrome-sandbox,nacl_helper}; do
patchelf --set-rpath $rpath $elf