nixpkgs/pkgs/applications/networking/browsers/chromium
emilylange 1724fc3271
chromium: work around rust toolchain requirement in M121+
M121 is the first version to require the new rust toolchain, which we
haven't ready yet.
Specifically, there seems to be an issue where clang looks up library
paths (with `clang_version = 17;` added to `gnFlags` (defaults to 18 and
is part of the lookup path)):

```
ninja: error: '../../../../nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/17/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a', needed by 'obj/third_party/protobuf/libprotoc_lib.a', missing and no known rule to make it
```

Instead of
```
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/17/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/lib/clang/18/lib/x86_64-unknown-linux-gnu/libclang_rt.builtins.a
```
it should be something like
```
/nix/store/q5f07rqsvsxnzwbw97yi8lacksrmy13x-clang-wrapper-17.0.6/resource-root/lib/linux/libclang_rt.builtins-x86_64.a
```

So to give us ever so slightly more time to figure out and fix the rust
toolchain, we revert the upstream commit, that requires the rust
toolchain.
The c++ version of the QR code generator will be gone in the next few
version bumps, meaning we can no longer work around this by then.
Again, this is only to buy us ever so slightly more time.

This could have been prepared better and ahead of the stable bump, but
we simply don't have enough chromium maintainers right now :(
2024-01-24 03:00:06 +01:00
..
patches chromium: use llvm 17 2023-12-17 02:09:25 +01:00
browser.nix chromium: drop inactive maintainers 2023-12-19 18:05:58 +01:00
common.nix chromium: work around rust toolchain requirement in M121+ 2024-01-24 03:00:06 +01:00
default.nix chromium: improve and move recompressTarball 2024-01-04 01:34:15 +01:00
get-commit-message.py
README.md Merge pull request #278603 from emilylange/chromium 2024-01-05 18:42:43 +01:00
recompress-tarball.nix chromium: improve and move recompressTarball 2024-01-04 01:34:15 +01:00
ungoogled-flags.toml ungoogled-chromium: 116.0.5845.187 -> 117.0.5938.88 2023-09-17 13:24:58 +02:00
ungoogled.nix chromium,chromedriver,electron: use hash instead of sha256 everywhere 2023-10-21 19:56:40 +02:00
update.py chromium: add update script command to use unreleased ungoogled-chromium 2023-11-29 22:23:46 +01:00
upstream-info.nix chromium: 120.0.6099.109 -> 121.0.6167.85 2024-01-23 21:35:22 +01:00

Maintainers

  • Note: We could always use more contributors, testers, etc. E.g.:

    • Dedicated maintainers for the NixOS stable channel
    • PRs with cleanups, improvements, fixes, etc. (but please try to make reviews as easy as possible)
    • People who handle stale issues/PRs
  • Other relevant packages:

    • google-chrome: Updated via Chromium's upstream-info.nix.
    • ungoogled-chromium: A patch set for Chromium, that has its own entry in Chromium's upstream-info.nix.
    • chromedriver: Updated via Chromium's upstream-info.nix and not built from source. Must match Chromium's major version.
    • electron-source: Various version of electron that are built from source using Chromium's -unwrapped derivation, due to electron being based on Chromium.

Upstream links

Updating Chromium

Simply run ./pkgs/applications/networking/browsers/chromium/update.py to update upstream-info.nix. After updates it is important to test at least nixosTests.chromium (or basic manual testing) and google-chrome (which reuses upstream-info.nix).

Note: The source tarball is often only available a few hours after the release was announced. The CI/CD status can be tracked here:

To run all automated NixOS VM tests for Chromium, ungoogled-chromium, and Google Chrome (not recommended, currently 6x tests!):

nix-build nixos/tests/chromium.nix

A single test can be selected, e.g. to test ungoogled-chromium (see channelMap in nixos/tests/chromium.nix for all available options):

nix-build nixos/tests/chromium.nix -A ungoogled

(Note: Testing Google Chrome requires export NIXPKGS_ALLOW_UNFREE=1.)

For custom builds it's possible to "override" channelMap.

Backports

All updates are considered security critical and should be ported to the stable channel ASAP. When there is a new stable release the old one should receive security updates for roughly one month. After that it is important to mark Chromium as insecure (see 69e4ae56c4 for an example; it is important that the tested job still succeeds and that all browsers that use upstream-info.nix are marked as insecure).

Major version updates

Unfortunately, Chromium regularly breaks on major updates and might need various patches. Either due to issues with the Nix build sandbox (e.g. we cannot fetch dependencies via the network and do not use standard FHS paths) or due to missing upstream fixes that need to be backported.

Good sources for such patches and other hints:

If the build fails immediately due to unknown compiler flags this usually means that a new major release of LLVM is required.

Beta and Dev channels

Those channels are only used to test and fix builds in advance. They may be broken at times and must not delay stable channel updates.

Testing

Useful tests: