From 1181bdd7175a5e2e137dd5f33336a6826b91a468 Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 5 Jan 2017 16:46:37 +0000 Subject: [PATCH] chromium, google-chrome: add commandLineArgs --- pkgs/applications/networking/browsers/chromium/default.nix | 2 ++ .../networking/browsers/google-chrome/default.nix | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index 1556603db2cf..d014999a667c 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -12,6 +12,7 @@ , enableWideVine ? false , cupsSupport ? true , pulseSupport ? false +, commandLineArgs ? "" }: let @@ -76,6 +77,7 @@ in stdenv.mkDerivation { mkdir -p "$out/bin" eval makeWrapper "${browserBinary}" "$out/bin/chromium" \ + ${commandLineArgs} \ ${concatMapStringsSep " " getWrapperFlags chromium.plugins.enabled} ed -v -s "$out/bin/chromium" << EOF diff --git a/pkgs/applications/networking/browsers/google-chrome/default.nix b/pkgs/applications/networking/browsers/google-chrome/default.nix index 938dbe09ebe6..abc314f85699 100644 --- a/pkgs/applications/networking/browsers/google-chrome/default.nix +++ b/pkgs/applications/networking/browsers/google-chrome/default.nix @@ -6,6 +6,9 @@ , alsaLib, libXdamage, libXtst, libXrandr, expat, cups , dbus_libs, gtk2, gdk_pixbuf, gcc +# command line arguments which are always set e.g "--disable-gpu" +, commandLineArgs ? "" + # Will crash without. , systemd @@ -106,7 +109,7 @@ in stdenv.mkDerivation rec { #!${bash}/bin/sh export LD_LIBRARY_PATH=$rpath\''${LD_LIBRARY_PATH:+:\$LD_LIBRARY_PATH} export PATH=$binpath\''${PATH:+:\$PATH} - $out/share/google/$appname/google-$appname "\$@" + $out/share/google/$appname/google-$appname ${commandLineArgs} "\$@" EOF chmod +x $exe