Skip to content

chromium: fix increased build time for non-cross-compilation builds, add ungoogled- prefix to chromium-unwrapped, move stray patches to right location#273435

Merged
yu-re-ka merged 3 commits intoNixOS:masterfrom
emilylange:chromium-fixes
Dec 12, 2023

Conversation

@emilylange
Copy link
Member

Description of changes

Supersedes #264326, which has been stale for over a month.

I decided to add two additional commits (19b4e0a and dd568a8) to this PR, as they would also trigger a full rebuild of {ungoogled-,}chromium.

More context about the cross-compilation issue is in #264326 and #229265 (comment).

This also frees up some compute ressources on hydra.nixos.org.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

emilylange and others added 3 commits December 10, 2023 22:24
Having

```nix
host_toolchain = "//build/toolchain/linux/unbundle:host";
v8_snapshot_toolchain = "//build/toolchain/linux/unbundle:host";
```

on native, non-cross-compilation builds roughly doubles the build steps
and, by proxy, compute and time needed to build.

So to resolve this, we conditionally change those values depending on
whether we are cross-compiling or not.

Co-authored-by: Adam Joseph <[email protected]>
@ofborg ofborg bot added 6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Dec 11, 2023
@emilylange
Copy link
Member Author

Result of nixpkgs-review pr 273435 run on x86_64-linux 1

68 packages built:
  • authy
  • bilibili
  • bitwarden
  • camunda-modeler
  • chromium
  • chromium.sandbox
  • deltachat-desktop
  • drawio
  • drawio-headless
  • electron
  • electron_26
  • electron_27
  • element-desktop
  • element-desktop-wayland
  • fast-cli
  • freetube
  • geogebra6
  • headset
  • heroic
  • heroic-unwrapped
  • itch
  • jitsi-meet-electron
  • mattermost-desktop
  • mermaid-cli
  • mermaid-filter
  • micropad
  • nix-tour
  • open-stage-control
  • pandoc-drawio-filter
  • pandoc-drawio-filter.dist
  • percollate
  • playwright-test
  • pocket-casts
  • podman-desktop
  • pritunl-client
  • puppeteer-cli
  • python310Packages.mkdocs-drawio-exporter
  • python310Packages.mkdocs-drawio-exporter.dist
  • python310Packages.pytest-playwright
  • python310Packages.pytest-playwright.dist
  • python311Packages.mkdocs-drawio-exporter
  • python311Packages.mkdocs-drawio-exporter.dist
  • python311Packages.pytest-playwright
  • python311Packages.pytest-playwright.dist
  • redisinsight
  • revolt-desktop
  • sharedown
  • sitespeed-io
  • standardnotes
  • stretchly
  • super-productivity
  • teams-for-linux
  • terra-station
  • thedesk
  • threema-desktop
  • tutanota-desktop
  • uhk-agent
  • uhk-udev-rules
  • uivonim
  • ungoogled-chromium
  • ungoogled-chromium.sandbox
  • vesktop
  • vhs
  • vieb
  • wayback
  • webcord
  • webcord-vencord
  • webtorrent_desktop
$ git describe --abbrev=40
24.05-pre-6917-g0838486e9183ce39398f01b221766e68b50f405c
$ nix-build nixos/tests/chromium.nix -A ungoogled -A stable
/nix/store/3d8kl96xz175rxrnijahfzpkfd8msg5x-vm-test-run-chromium-ungoogled
/nix/store/466dsmaf3sabbkiq795aix79lqjdf25d-vm-test-run-chromium-stable

fyi @yu-re-ka: this greatly reduces the time to build electron from source as well :)

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 11, 2023
@delroth delroth added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Dec 11, 2023
@yu-re-ka yu-re-ka merged commit 0ed60bb into NixOS:master Dec 12, 2023
@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: cross-compilation Building packages on a different platform than they will be used on 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants