brave: add support for command line arguments

Add formal argument `commandLineArgs` to the brave derivation and append it
to the `gappsWrapperArgs` expected by the `wrapGAppsHook`. This adds some
flexibility to the wrapper creation of brave, and aligns with customization
avalible in other chromium derivation.
main
polykernel 3 years ago
parent 876fb5677c
commit 9ab82127b5
  1. 6
      pkgs/applications/networking/browsers/brave/default.nix

@ -41,6 +41,7 @@
, zlib
, xdg-utils
, wrapGAppsHook
, commandLineArgs ? ""
}:
let
@ -156,6 +157,11 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
preFixup = ''
# Add command line args to wrapGApp.
gappsWrapperArgs+=(--add-flags ${lib.escapeShellArg commandLineArgs})
'';
installCheckPhase = ''
# Bypass upstream wrapper which suppresses errors
$out/opt/brave.com/brave/brave --version

Loading…
Cancel
Save