diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix index aeb56d88eabe..3e35b704120c 100644 --- a/pkgs/applications/networking/browsers/chromium/default.nix +++ b/pkgs/applications/networking/browsers/chromium/default.nix @@ -69,14 +69,17 @@ in stdenv.mkDerivation { buildCommand = let browserBinary = "${chromium.browser}/libexec/chromium/chromium"; sandboxBinary = "${chromium.sandbox}/bin/chromium-sandbox"; - in '' + mkEnvVar = key: val: "--set '${key}' '${val}'"; + envVars = chromium.plugins.settings.envVars or {}; + flags = chromium.plugins.settings.flags or []; + in with stdenv.lib; '' mkdir -p "$out/bin" "$out/share/applications" ln -s "${chromium.browser}/share" "$out/share" makeWrapper "${browserBinary}" "$out/bin/chromium" \ --set CHROMIUM_SANDBOX_BINARY_PATH "${sandboxBinary}" \ - --run "export ${chromium.plugins.envVarsEnabled}" \ - --add-flags "${chromium.plugins.flagsEnabled}" + ${concatStrings (mapAttrsToList mkEnvVar envVars)} \ + --add-flags "${concatStringsSep " " flags}" ln -s "$out/bin/chromium" "$out/bin/chromium-browser" ln -s "${chromium.browser}/share/icons" "$out/share/icons" diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index 8098ec747227..55e0cc4caa21 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -62,29 +62,38 @@ let install -vD PepperFlash/libpepflashplayer.so \ "$flash/lib/libpepflashplayer.so" mkdir -p "$flash/nix-support" - echo "--ppapi-flash-path='$flash/lib/libpepflashplayer.so'" \ - "--ppapi-flash-version=$flashVersion" \ - > "$flash/nix-support/chromium-flags" + cat > "$flash/nix-support/chromium-plugin.nix" < "$widevine/nix-support/chromium-flags" - echo "NIX_CHROMIUM_PLUGIN_PATH_WIDEVINE=$widevine/lib" \ - > "$widevine/nix-support/chromium-env-vars" + cat > "$widevine/nix-support/chromium-plugin.nix" <