aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/browser.nix13
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/common.nix154
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/default.nix43
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/dont-use-ANGLE-by-default.patch26
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-vdpau-support-for-nvidia.patch65
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-video-acceleration-on-linux.patch48
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/nix_plugin_paths_68.patch61
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/remove-webp-include-69.patch11
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/ungoogled-src.nix6
-rwxr-xr-xinfra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/update.py30
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/upstream-info.json42
11 files changed, 137 insertions, 362 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/browser.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/browser.nix
index f87acc8722e4..c5cbee196521 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/browser.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/browser.nix
@@ -13,7 +13,7 @@ mkChromiumDerivation (base: rec {
installPhase = ''
mkdir -p "$libExecPath"
- cp -v "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
+ cp -v "$buildPath/"*.so "$buildPath/"*.pak "$buildPath/"*.bin "$libExecPath/"
cp -v "$buildPath/icudtl.dat" "$libExecPath/"
cp -vLR "$buildPath/locales" "$buildPath/resources" "$libExecPath/"
cp -v "$buildPath/chrome" "$libExecPath/$packageName"
@@ -78,17 +78,10 @@ mkChromiumDerivation (base: rec {
'';
homepage = "https://github.com/Eloston/ungoogled-chromium";
maintainers = with maintainers; [ squalus ];
- # Overview of the maintainer roles:
- # nixos-unstable:
- # - TODO: Need a new maintainer for x86_64 [0]
- # - @thefloweringash: aarch64
- # - @primeos: Provisional maintainer (x86_64)
- # Stable channel:
- # - TODO (need someone to test backports [0])
- # [0]: https://github.com/NixOS/nixpkgs/issues/78450
license = if enableWideVine then licenses.unfree else licenses.bsd3;
platforms = platforms.linux;
hydraPlatforms = if channel == "stable" then ["aarch64-linux" "x86_64-linux"] else [];
- timeout = 172800; # 48 hours
+ timeout = 172800; # 48 hours (increased from the Hydra default of 10h)
+ broken = channel == "dev"; # Blocked on https://bugs.chromium.org/p/chromium/issues/detail?id=1141896
};
})
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/common.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/common.nix
index 421d6bb745a0..2accb1a7ab21 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/common.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/common.nix
@@ -5,25 +5,24 @@
, libevent, expat, libjpeg, snappy
, libpng, libcap
, xdg_utils, yasm, nasm, minizip, libwebp
-, libusb1, pciutils, nss, re2, zlib
+, libusb1, pciutils, nss, re2
, python2Packages, perl, pkgconfig
, nspr, systemd, kerberos
-, utillinux, alsaLib
+, util-linux, alsaLib
, bison, gperf
, glib, gtk3, dbus-glib
, glibc
-, xorg
, libXScrnSaver, libXcursor, libXtst, libGLU, libGL
, protobuf, speechd, libXdamage, cups
-, ffmpeg_3, libxslt, libxml2, at-spi2-core
+, ffmpeg, libxslt, libxml2, at-spi2-core
, jre8
, pipewire_0_2
# optional dependencies
, libgcrypt ? null # gnomeSupport || cupsSupport
, libva ? null # useVaapi
-, libdrm ? null, wayland ? null, mesa_drivers ? null, libxkbcommon ? null # useOzone
+, libdrm ? null, wayland ? null, mesa ? null, libxkbcommon ? null # useOzone
# package customization
, useOzone ? false
@@ -49,8 +48,6 @@ buildFun:
with stdenv.lib;
-# see http://www.linuxfromscratch.org/blfs/view/cvs/xsoft/chromium.html
-
let
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
@@ -66,7 +63,7 @@ let
mkGnFlags =
let
# Serialize Nix types into GN types according to this document:
- # https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/language.md
+ # https://source.chromium.org/gn/gn/+/master:docs/language.md
mkGnString = value: "\"${escape ["\"" "$" "\\"] value}\"";
sanitize = value:
if value == true then "true"
@@ -78,14 +75,17 @@ let
toFlag = key: value: "${key}=${sanitize value}";
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
+ # https://source.chromium.org/chromium/chromium/src/+/master:build/linux/unbundle/replace_gn_files.py
gnSystemLibraries = [
- "flac" "libwebp" "libxslt" "opus" "snappy" "libpng"
- # "zlib" # version 77 reports unresolved dependency on //third_party/zlib:zlib_config
- # "libjpeg" # fails with multiple undefined references to chromium_jpeg_*
- # "re2" # fails with linker errors
- # "ffmpeg" # https://crbug.com/731766
- # "harfbuzz-ng" # in versions over 63 harfbuzz and freetype are being built together
- # so we can't build with one from system and other from source
+ "ffmpeg"
+ "flac"
+ "libjpeg"
+ "libpng"
+ "libwebp"
+ "libxslt"
+ "opus"
+ "snappy"
+ "zlib"
];
opusWithCustomModes = libopus.override {
@@ -97,11 +97,9 @@ let
libevent expat libjpeg snappy
libpng libcap
xdg_utils minizip libwebp
- libusb1 re2 zlib
- ffmpeg_3 libxslt libxml2
+ libusb1 re2
+ ffmpeg libxslt libxml2
nasm
- # harfbuzz # in versions over 63 harfbuzz and freetype are being built together
- # so we can't build with one from system and other from source
];
# build paths and release info
@@ -135,15 +133,15 @@ let
};
nativeBuildInputs = [
+ llvmPackages.lldClang.bintools
ninja which python2Packages.python perl pkgconfig
python2Packages.ply python2Packages.jinja2 nodejs
gnutar python2Packages.setuptools
- (xorg.xcbproto.override { python = python2Packages.python; })
];
buildInputs = defaultDependencies ++ [
nspr nss systemd
- utillinux alsaLib
+ util-linux alsaLib
bison gperf kerberos
glib gtk3 dbus-glib
libXScrnSaver libXcursor libXtst libGLU libGL
@@ -155,36 +153,37 @@ let
++ optionals gnomeSupport [ gnome.GConf libgcrypt ]
++ optionals cupsSupport [ libgcrypt cups ]
++ optional pulseSupport libpulseaudio
- ++ optionals useOzone [ libdrm wayland mesa_drivers libxkbcommon ];
-
- patches = optionals (versionRange "68" "86") [
- ./patches/nix_plugin_paths_68.patch
- ] ++ [
- ./patches/remove-webp-include-69.patch
- ./patches/no-build-timestamps.patch
- ./patches/widevine-79.patch
- ./patches/dont-use-ANGLE-by-default.patch
- # Unfortunately, chromium regularly breaks on major updates and
- # then needs various patches backported in order to be compiled with GCC.
- # Good sources for such patches and other hints:
- # - https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/
- # - https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/chromium
- # - https://github.com/chromium/chromium/search?q=GCC&s=committer-date&type=Commits
- #
- # ++ optionals (channel == "dev") [ ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" ) ]
+ ++ optionals useOzone [ libdrm wayland mesa.drivers libxkbcommon ];
+
+ patches = [
+ ./patches/no-build-timestamps.patch # Optional patch to use SOURCE_DATE_EPOCH in compute_build_timestamp.py (should be upstreamed)
+ ./patches/widevine-79.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags
# ++ optional (versionRange "68" "72") ( githubPatch "<patch>" "0000000000000000000000000000000000000000000000000000000000000000" )
- ] ++ optionals (useVaapi && versionRange "68" "86") [ # Improvements for the VA-API build:
- ./patches/enable-vdpau-support-for-nvidia.patch # https://aur.archlinux.org/cgit/aur.git/tree/vdpau-support.patch?h=chromium-vaapi
- ./patches/enable-video-acceleration-on-linux.patch # Can be controlled at runtime (i.e. without rebuilding Chromium)
+ ] ++ optionals (useVaapi && versionRange "86" "87") [
+ # Check for enable-accelerated-video-decode on Linux:
+ (githubPatch "54deb9811ca9bd2327def5c05ba6987b8c7a0897" "11jvxjlkzz1hm0pvfyr88j7z3zbwzplyl5idkx92l2lzv4459c8d")
];
- postPatch = optionalString (!versionRange "0" "86") ''
+ postPatch = ''
+ # remove unused third-party
+ for lib in ${toString gnSystemLibraries}; do
+ if [ -d "third_party/$lib" ]; then
+ find "third_party/$lib" -type f \
+ \! -path "third_party/$lib/chromium/*" \
+ \! -path "third_party/$lib/google/*" \
+ \! -path "third_party/harfbuzz-ng/utils/hb_scoped.h" \
+ \! -regex '.*\.\(gn\|gni\|isolate\)' \
+ -delete
+ fi
+ done
+
# Required for patchShebangs (unsupported interpreter directive, basename: invalid option -- '*', etc.):
- substituteInPlace native_client/SConstruct \
- --replace "#! -*- python -*-" ""
- substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
- --replace "/usr/bin/env -S make -f" "/usr/bin/make -f"
- '' + ''
+ substituteInPlace native_client/SConstruct --replace "#! -*- python -*-" ""
+ if [ -e third_party/harfbuzz-ng/src/src/update-unicode-tables.make ]; then
+ substituteInPlace third_party/harfbuzz-ng/src/src/update-unicode-tables.make \
+ --replace "/usr/bin/env -S make -f" "/usr/bin/make -f"
+ fi
+
# We want to be able to specify where the sandbox is via CHROME_DEVEL_SANDBOX
substituteInPlace sandbox/linux/suid/client/setuid_sandbox_host.cc \
--replace \
@@ -202,11 +201,6 @@ let
'/usr/share/locale/' \
'${glibc}/share/locale/'
- substituteInPlace ui/gfx/x/BUILD.gn \
- --replace \
- '/usr/share/xcb' \
- '${xorg.xcbproto}/share/xcb/'
-
sed -i -e 's@"\(#!\)\?.*xdg-@"\1${xdg_utils}/bin/xdg-@' \
chrome/browser/shell_integration_linux.cc
@@ -216,42 +210,20 @@ let
sed -i -e '/libpci_loader.*Load/s!"\(libpci\.so\)!"${pciutils}/lib/\1!' \
gpu/config/gpu_info_collector_linux.cc
- sed -i -re 's/([^:])\<(isnan *\()/\1std::\2/g' \
- chrome/browser/ui/webui/engagement/site_engagement_ui.cc
-
- sed -i -e '/#include/ {
- i #include <algorithm>
- :l; n; bl
- }' gpu/config/gpu_control_list.cc
-
# Allow to put extensions into the system-path.
sed -i -e 's,/usr,/run/current-system/sw,' chrome/common/chrome_paths.cc
patchShebangs .
# use our own nodejs
mkdir -p third_party/node/linux/node-linux-x64/bin
- ln -s $(which node) third_party/node/linux/node-linux-x64/bin/node
+ ln -s "$(command -v node)" third_party/node/linux/node-linux-x64/bin/node
+
+ # Allow building against system libraries in official builds
+ sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' tools/generate_shim_headers/generate_shim_headers.py
- # remove unused third-party
- # in third_party/crashpad third_party/zlib contains just a header-adapter
- for lib in ${toString gnSystemLibraries}; do
- find -type f -path "*third_party/$lib/*" \
- \! -path "*third_party/crashpad/crashpad/third_party/zlib/*" \
- \! -path "*third_party/$lib/chromium/*" \
- \! -path "*third_party/$lib/google/*" \
- \! -path "*base/third_party/icu/*" \
- \! -path "*base/third_party/libevent/*" \
- \! -regex '.*\.\(gn\|gni\|isolate\|py\)' \
- -delete
- done
'' + optionalString stdenv.isAarch64 ''
substituteInPlace build/toolchain/linux/BUILD.gn \
--replace 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
- '' + optionalString stdenv.cc.isClang ''
- mkdir -p third_party/llvm-build/Release+Asserts/bin
- ln -s ${stdenv.cc}/bin/clang third_party/llvm-build/Release+Asserts/bin/clang
- ln -s ${stdenv.cc}/bin/clang++ third_party/llvm-build/Release+Asserts/bin/clang++
- ln -s ${llvmPackages.llvm}/bin/llvm-ar third_party/llvm-build/Release+Asserts/bin/llvm-ar
'' + optionalString ungoogled ''
${ungoogler}/utils/prune_binaries.py . ${ungoogler}/pruning.list || echo "some errors"
${ungoogler}/utils/patches.py . ${ungoogler}/patches
@@ -259,9 +231,9 @@ let
'';
gnFlags = mkGnFlags ({
- use_lld = false;
- use_gold = true;
- gold_path = "${stdenv.cc}/bin";
+ custom_toolchain = "//build/toolchain/linux/unbundle:default";
+ host_toolchain = "//build/toolchain/linux/unbundle:default";
+ is_official_build = true;
is_debug = false;
proprietary_codecs = false;
@@ -283,6 +255,7 @@ let
is_clang = stdenv.cc.isClang;
clang_use_chrome_plugins = false;
blink_symbol_level = 0;
+ symbol_level = 0;
fieldtrial_testing_like_official_build = true;
# Google API keys, see:
@@ -336,8 +309,7 @@ let
# This is to ensure expansion of $out.
libExecPath="${libExecPath}"
- python build/linux/unbundle/replace_gn_files.py \
- --system-libraries ${toString gnSystemLibraries}
+ python build/linux/unbundle/replace_gn_files.py --system-libraries ${toString gnSystemLibraries}
${gnChromium}/bin/gn gen --args=${escapeShellArg gnFlags} out/Release | tee gn-gen-outputs.txt
# Fail if `gn gen` contains a WARNING.
@@ -352,15 +324,8 @@ let
NIX_CFLAGS_COMPILE = "-Wno-unknown-warning-option";
buildPhase = let
- # Build paralelism: on Hydra the build was frequently running into memory
- # exhaustion, and even other users might be running into similar issues.
- # -j is halved to avoid memory problems, and -l is slightly increased
- # so that the build gets slight preference before others
- # (it will often be on "critical path" and at risk of timing out)
buildCommand = target: ''
- ninja -C "${buildPath}" \
- -j$(( ($NIX_BUILD_CORES+1) / 2 )) -l$(( $NIX_BUILD_CORES+1 )) \
- "${target}"
+ ninja -C "${buildPath}" -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES "${target}"
(
source chrome/installer/linux/common/installer.include
PACKAGE=$packageName
@@ -379,7 +344,12 @@ let
patchelf --set-rpath "${libGL}/lib:$origRpath" "$chromiumBinary"
'';
- passthru.updateScript = ./update.py;
+ passthru = {
+ updateScript = ./update.py;
+ chromiumDeps = {
+ gn = gnChromium;
+ };
+ };
};
# Remove some extraAttrs we supplied to the base attributes already.
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/default.nix
index 7c581ee633f6..b02c91c6e230 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/default.nix
@@ -1,5 +1,5 @@
{ newScope, config, stdenv, fetchurl, makeWrapper
-, llvmPackages_10, llvmPackages_11, ed, gnugrep, coreutils, xdg_utils
+, llvmPackages_11, ed, gnugrep, coreutils, xdg_utils
, glib, gtk3, gnome3, gsettings-desktop-schemas, gn, fetchgit
, libva ? null
, pipewire_0_2
@@ -14,8 +14,7 @@
, proprietaryCodecs ? true
, enablePepperFlash ? false
, enableWideVine ? false
-, useVaapi ? false # Deprecated, use enableVaapi instead!
-, enableVaapi ? false # Disabled by default due to unofficial support and issues on radeon
+, enableVaapi ? false # Disabled by default due to unofficial support
, ungoogled ? true
, useOzone ? false
, cupsSupport ? true
@@ -24,7 +23,7 @@
}:
let
- llvmPackages = llvmPackages_10;
+ llvmPackages = llvmPackages_11;
stdenv = llvmPackages.stdenv;
callPackage = newScope chromium;
@@ -38,36 +37,15 @@ let
inherit channel gnome gnomeSupport gnomeKeyringSupport proprietaryCodecs
cupsSupport pulseSupport useOzone;
inherit ungoogled;
- # TODO: Remove after we can update gn for the stable channel (backward incompatible changes):
gnChromium = gn.overrideAttrs (oldAttrs: {
- version = "2020-05-19";
+ inherit (upstream-info.deps.gn) version;
src = fetchgit {
- url = "https://gn.googlesource.com/gn";
- rev = "d0a6f072070988e7b038496c4e7d6c562b649732";
- sha256 = "0197msabskgfbxvhzq73gc3wlr3n9cr4bzrhy5z5irbvy05lxk17";
- };
- });
- } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "86") {
- llvmPackages = llvmPackages_11;
- gnChromium = gn.overrideAttrs (oldAttrs: {
- version = "2020-07-20";
- src = fetchgit {
- url = "https://gn.googlesource.com/gn";
- rev = "3028c6a426a4aaf6da91c4ebafe716ae370225fe";
- sha256 = "0h3wf4152zdvrbb0jbj49q6814lfl3rcy5mj8b2pl9s0ahvkbc6q";
+ inherit (upstream-info.deps.gn) url rev sha256;
};
});
} // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "87") {
- llvmPackages = llvmPackages_11;
useOzone = true; # YAY: https://chromium-review.googlesource.com/c/chromium/src/+/2382834 \o/
- gnChromium = gn.overrideAttrs (oldAttrs: {
- version = "2020-08-17";
- src = fetchgit {
- url = "https://gn.googlesource.com/gn";
- rev = "6f13aaac55a977e1948910942675c69f2b4f7a94";
- sha256 = "01hpma1sllpdx09mvr4d6073sg6zmk6iv44kd3r28khymcj4s251";
- };
- });
+ useVaapi = !stdenv.isAarch64; # TODO: Might be best to not set use_vaapi anymore (default is fine)
});
browser = callPackage ./browser.nix { inherit channel enableWideVine; };
@@ -162,13 +140,6 @@ let
''
else browser;
- optionalVaapiFlags = if useVaapi # TODO: Remove after 20.09:
- then throw ''
- Chromium's useVaapi was replaced by enableVaapi and you don't need to pass
- "--ignore-gpu-blacklist" anymore (also no rebuilds are required anymore).
- '' else lib.optionalString
- (!enableVaapi)
- "--add-flags --disable-accelerated-video-decode --add-flags --disable-accelerated-video-encode";
in stdenv.mkDerivation {
name = "ungoogled-chromium${suffix}-${version}";
inherit version;
@@ -195,7 +166,7 @@ in stdenv.mkDerivation {
eval makeWrapper "${browserBinary}" "$out/bin/chromium" \
--add-flags ${escapeShellArg (escapeShellArg commandLineArgs)} \
- ${optionalVaapiFlags} \
+ ${lib.optionalString enableVaapi "--add-flags --enable-accelerated-video-decode"} \
${concatMapStringsSep " " getWrapperFlags chromium.plugins.enabled}
ed -v -s "$out/bin/chromium" << EOF
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/dont-use-ANGLE-by-default.patch b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/dont-use-ANGLE-by-default.patch
deleted file mode 100644
index 9f14a304eb34..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/dont-use-ANGLE-by-default.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-A field trial currently enables the passthrough command decoder, which causes
-gl_factory.cc to try kGLImplementationEGLANGLE first, which causes Chromium to fail
-to load libGLESv2.so on NixOS. It somehow does not try kGLImplementationDesktopGL,
-and so there is no GL support at all.
-
-Revert to using the validating command decoder, which prevents gl_factory.cc
-from touching allowed_impls, allowing it to successfully use kGLImplementationDesktopGL.
-
-diff --git a/ui/gl/gl_utils.cc b/ui/gl/gl_utils.cc
-index 697cbed5fe2d..8419bdb21a2f 100644
---- a/ui/gl/gl_utils.cc
-+++ b/ui/gl/gl_utils.cc
-@@ -71,9 +71,10 @@ bool UsePassthroughCommandDecoder(const base::CommandLine* command_line) {
- } else if (switch_value == kCmdDecoderValidatingName) {
- return false;
- } else {
-- // Unrecognized or missing switch, use the default.
-- return base::FeatureList::IsEnabled(
-- features::kDefaultPassthroughCommandDecoder);
-+ // Ignore the field trial that enables it; disable it until
-+ // gl_factory.cc kGLImplementationEGLANGLE issues are sorted
-+ // out on NixOS.
-+ return false;
- }
- }
- }
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-vdpau-support-for-nvidia.patch b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-vdpau-support-for-nvidia.patch
deleted file mode 100644
index 8d879de7bfd8..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-vdpau-support-for-nvidia.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
-@@ -641,6 +641,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
- // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
- // internal decoded frame.
- if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
-+ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau &&
- !vpp_vaapi_wrapper_) {
- vpp_vaapi_wrapper_ = VaapiWrapper::Create(
- VaapiWrapper::kVideoProcess, VAProfileNone,
-@@ -665,7 +666,8 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
- PictureBuffer buffer = buffers[i];
- buffer.set_size(requested_pic_size_);
- std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
-- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
-+ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
-+ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
- ? vaapi_wrapper_
- : vpp_vaapi_wrapper_,
- make_context_current_cb_, bind_image_cb_, buffer);
-@@ -1093,6 +1095,12 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
-
- VaapiVideoDecodeAccelerator::BufferAllocationMode
- VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
-+ // NVIDIA blobs use VDPAU
-+ if (VaapiWrapper::GetImplementationType() == VAImplementation::kNVIDIAVDPAU) {
-+ LOG(INFO) << "VA-API driver on VDPAU backend";
-+ return BufferAllocationMode::kWrapVdpau;
-+ }
-+
- // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
- // |output_mode_| as well.
- if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
---- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h
-+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h
-@@ -204,6 +204,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
- // Using |client_|s provided PictureBuffers and as many internally
- // allocated.
- kNormal,
-+ kWrapVdpau,
- };
-
- // Decides the concrete buffer allocation mode, depending on the hardware
---- a/media/gpu/vaapi/vaapi_wrapper.cc
-+++ b/media/gpu/vaapi/vaapi_wrapper.cc
-@@ -131,6 +131,9 @@ media::VAImplementation VendorStringToImplementationType(
- } else if (base::StartsWith(va_vendor_string, "Intel iHD driver",
- base::CompareCase::SENSITIVE)) {
- return media::VAImplementation::kIntelIHD;
-+ } else if (base::StartsWith(va_vendor_string, "Splitted-Desktop Systems VDPAU",
-+ base::CompareCase::SENSITIVE)) {
-+ return media::VAImplementation::kNVIDIAVDPAU;
- }
- return media::VAImplementation::kOther;
- }
---- a/media/gpu/vaapi/vaapi_wrapper.h
-+++ b/media/gpu/vaapi/vaapi_wrapper.h
-@@ -79,6 +79,7 @@ enum class VAImplementation {
- kIntelIHD,
- kOther,
- kInvalid,
-+ kNVIDIAVDPAU,
- };
-
- // This class handles VA-API calls and ensures proper locking of VA-API calls
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-video-acceleration-on-linux.patch b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-video-acceleration-on-linux.patch
deleted file mode 100644
index bd278633f67e..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/enable-video-acceleration-on-linux.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b2144fd28e09cd52e7a88a62a9d9b54cf9922f9f Mon Sep 17 00:00:00 2001
-From: Michael Weiss <dev.primeos@gmail.com>
-Date: Tue, 14 Apr 2020 14:16:10 +0200
-Subject: [PATCH] Enable accelerated video decode on Linux
-
-This will enable accelerated video decode on Linux by default (i.e.
-without "--ignore-gpu-blacklist"), but on NixOS we'll provide
-"--disable-accelerated-video-decode" and
-"--disable-accelerated-video-encode" by default to avoid regressions
-(e.g. VA-API doesn't work properly for some radeon drivers).
-
-Video acceleration can then be enabled via:
-chromium.override { enableVaapi = true; }
-without rebuilding Chromium.
----
- gpu/config/software_rendering_list.json | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/gpu/config/software_rendering_list.json b/gpu/config/software_rendering_list.json
-index 22712bdbf38f..a06dd19a50e4 100644
---- a/gpu/config/software_rendering_list.json
-+++ b/gpu/config/software_rendering_list.json
-@@ -336,22 +336,6 @@
- ]
- },
- {
-- "id": 48,
-- "description": "Accelerated video decode is unavailable on Linux",
-- "cr_bugs": [137247, 1032907],
-- "os": {
-- "type": "linux"
-- },
-- "exceptions": [
-- {
-- "machine_model_name": ["Chromecast"]
-- }
-- ],
-- "features": [
-- "accelerated_video_decode"
-- ]
-- },
-- {
- "id": 50,
- "description": "Disable VMware software renderer on older Mesa",
- "cr_bugs": [145531, 332596, 571899, 629434],
---
-2.11.0
-
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/nix_plugin_paths_68.patch b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/nix_plugin_paths_68.patch
deleted file mode 100644
index da6a4c92b460..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/nix_plugin_paths_68.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
-index f4e119d..d9775bd 100644
---- a/chrome/common/chrome_paths.cc
-+++ b/chrome/common/chrome_paths.cc
-@@ -68,21 +68,14 @@ static base::LazyInstance<base::FilePath>
- g_invalid_specified_user_data_dir = LAZY_INSTANCE_INITIALIZER;
-
- // Gets the path for internal plugins.
--bool GetInternalPluginsDirectory(base::FilePath* result) {
--#if defined(OS_MACOSX)
-- // If called from Chrome, get internal plugins from a subdirectory of the
-- // framework.
-- if (base::mac::AmIBundled()) {
-- *result = chrome::GetFrameworkBundlePath();
-- DCHECK(!result->empty());
-- *result = result->Append("Internet Plug-Ins");
-- return true;
-- }
-- // In tests, just look in the module directory (below).
--#endif
--
-- // The rest of the world expects plugins in the module directory.
-- return base::PathService::Get(base::DIR_MODULE, result);
-+bool GetInternalPluginsDirectory(base::FilePath* result,
-+ const std::string& ident) {
-+ std::string full_env = std::string("NIX_CHROMIUM_PLUGIN_PATH_") + ident;
-+ const char* value = getenv(full_env.c_str());
-+ if (value == NULL)
-+ return base::PathService::Get(base::DIR_MODULE, result);
-+ else
-+ *result = base::FilePath(value);
- }
-
- // Gets the path for bundled implementations of components. Note that these
-@@ -272,7 +265,7 @@ bool PathProvider(int key, base::FilePath* result) {
- create_dir = true;
- break;
- case chrome::DIR_INTERNAL_PLUGINS:
-- if (!GetInternalPluginsDirectory(&cur))
-+ if (!GetInternalPluginsDirectory(&cur, "ALL"))
- return false;
- break;
- case chrome::DIR_COMPONENTS:
-@@ -280,7 +273,7 @@ bool PathProvider(int key, base::FilePath* result) {
- return false;
- break;
- case chrome::DIR_PEPPER_FLASH_PLUGIN:
-- if (!GetInternalPluginsDirectory(&cur))
-+ if (!GetInternalPluginsDirectory(&cur, "PEPPERFLASH"))
- return false;
- cur = cur.Append(kPepperFlashBaseDirectory);
- break;
-@@ -358,7 +351,7 @@ bool PathProvider(int key, base::FilePath* result) {
- cur = cur.DirName();
- }
- #else
-- if (!GetInternalPluginsDirectory(&cur))
-+ if (!GetInternalPluginsDirectory(&cur, "PNACL"))
- return false;
- #endif
- cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/remove-webp-include-69.patch b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/remove-webp-include-69.patch
deleted file mode 100644
index 07572cf7ee94..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/patches/remove-webp-include-69.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
-+++ b/third_party/blink/renderer/platform/image-encoders/image_encoder.cc
-@@ -13,7 +13,7 @@
-
- #include "jpeglib.h" // for JPEG_MAX_DIMENSION
-
--#include "third_party/libwebp/src/webp/encode.h" // for WEBP_MAX_DIMENSION
-+#define WEBP_MAX_DIMENSION 16383
-
- namespace blink {
-
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/ungoogled-src.nix b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/ungoogled-src.nix
index 73f4e4c9e83d..73c9796aaa96 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/ungoogled-src.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/ungoogled-src.nix
@@ -1,6 +1,6 @@
{
- "85.0.4183.102" = {
- rev = "85.0.4183.102-1";
- sha256 = "1mdx4a5zcs3an9yx1jxx4amq8p9rcj0hv76r8y7nz6cpsfgd9n3y";
+ "86.0.4240.183" = {
+ rev = "86.0.4240.183-1";
+ sha256 = "0528l2wr5bpl1cwsxzl5zxz1gw91kffkh5j1kzmc5n7m4mscqxyc";
};
}
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/update.py b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/update.py
index bfc7f0d2478c..b404ca555bff 100755
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/update.py
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/update.py
@@ -1,13 +1,15 @@
#! /usr/bin/env nix-shell
-#! nix-shell -i python -p python3 nix
+#! nix-shell -i python -p python3 nix nix-prefetch-git
import csv
import json
+import re
import subprocess
import sys
from codecs import iterdecode
from collections import OrderedDict
+from datetime import datetime
from os.path import abspath, dirname
from urllib.request import urlopen
@@ -26,6 +28,30 @@ def nix_prefetch_url(url, algo='sha256'):
out = subprocess.check_output(['nix-prefetch-url', '--type', algo, url])
return out.decode('utf-8').rstrip()
+def nix_prefetch_git(url, rev):
+ print(f'nix-prefetch-git {url} {rev}')
+ out = subprocess.check_output(['nix-prefetch-git', '--quiet', '--url', url, '--rev', rev])
+ return json.loads(out)
+
+def get_file_revision(revision, file_path):
+ url = f'https://raw.githubusercontent.com/chromium/chromium/{revision}/{file_path}'
+ with urlopen(url) as http_response:
+ return http_response.read()
+
+def get_channel_dependencies(channel):
+ deps = get_file_revision(channel['version'], 'DEPS')
+ gn_pattern = b"'gn_version': 'git_revision:([0-9a-f]{40})'"
+ gn_commit = re.search(gn_pattern, deps).group(1).decode()
+ gn = nix_prefetch_git('https://gn.googlesource.com/gn', gn_commit)
+ return {
+ 'gn': {
+ 'version': datetime.fromisoformat(gn['date']).date().isoformat(),
+ 'url': gn['url'],
+ 'rev': gn['rev'],
+ 'sha256': gn['sha256']
+ }
+ }
+
channels = {}
last_channels = load_json(JSON_PATH)
@@ -58,6 +84,8 @@ with urlopen(HISTORY_URL) as resp:
# the next one.
continue
+ channel['deps'] = get_channel_dependencies(channel)
+
channels[channel_name] = channel
with open(JSON_PATH, 'w') as out:
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/upstream-info.json b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/upstream-info.json
index dae7f741b357..565f884c5102 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/upstream-info.json
+++ b/infra/libkookie/nixpkgs/pkgs/applications/networking/browsers/ungoogled-chromium/upstream-info.json
@@ -1,17 +1,41 @@
{
"stable": {
- "version": "85.0.4183.102",
- "sha256": "032yh1mfwins7a62zw8kwwq8xw1n52a0a93lqz7qlyjaf9sd8s4a",
- "sha256bin64": "1i8xaxxnmg80vsia8hxnq58qi9k5nnbrl80d6d23g9lb7dbc9cpm"
+ "version": "86.0.4240.183",
+ "sha256": "1g39i82js7fm4fqb8i66d6xs0kzqjxzi4vzvvwz5y9rkbikcc4ma",
+ "sha256bin64": "1r0dxqsx6j19hgwr3v2sdlb2vd7gb961c4wba4ymd8wy8j8pzly9",
+ "deps": {
+ "gn": {
+ "version": "2020-08-07",
+ "url": "https://gn.googlesource.com/gn",
+ "rev": "e327ffdc503815916db2543ec000226a8df45163",
+ "sha256": "0kvlfj3www84zp1vmxh76x8fdjm9hyk8lkh2vdsidafpmm75fphr"
+ }
+ }
},
"beta": {
- "version": "86.0.4240.30",
- "sha256": "1isj0zngb72k1hhn3h0s8mccg1cdmppz1mjmg19f2h306farzmzl",
- "sha256bin64": "10d8im2adqqnkd6265gngv6xlm5qsz6r13z6cbbchsss0ssr8fxa"
+ "version": "87.0.4280.40",
+ "sha256": "07xh76fl257np68way6i5rf64qbvirkfddy7m5gvqb0fzcqd7dp3",
+ "sha256bin64": "1b2z0aqlh28pqrk6dmabxp1d4mvp9iyfmi4kqmns4cdpg0qgaf41",
+ "deps": {
+ "gn": {
+ "version": "2020-09-09",
+ "url": "https://gn.googlesource.com/gn",
+ "rev": "e002e68a48d1c82648eadde2f6aafa20d08c36f2",
+ "sha256": "0x4c7amxwzxs39grqs3dnnz0531mpf1p75niq7zhinyfqm86i4dk"
+ }
+ }
},
"dev": {
- "version": "87.0.4252.0",
- "sha256": "1lxlsdni63zh79hxvpwgmnfn67kgfzhz3yg9bkxghqchqykkz92y",
- "sha256bin64": "130hf7b35wcxpw05ddbqq89x10c0kays1vb9qg6xhq3zx2mk6ijw"
+ "version": "88.0.4300.0",
+ "sha256": "00cfs2rp4h8ybn2snr1d8ygg635hx7q5gv2aqriy1j6f8a1pgh1b",
+ "sha256bin64": "110r1m14h91212nx6pfhn8wkics7wlwx1608l5cqsxxcpvpzl3pv",
+ "deps": {
+ "gn": {
+ "version": "2020-09-09",
+ "url": "https://gn.googlesource.com/gn",
+ "rev": "e002e68a48d1c82648eadde2f6aafa20d08c36f2",
+ "sha256": "0x4c7amxwzxs39grqs3dnnz0531mpf1p75niq7zhinyfqm86i4dk"
+ }
+ }
}
}