Commit Graph

315 Commits

Author SHA1 Message Date
emilylange
b71ae2d950
chromium,chromedriver: 129.0.6668.100 -> 130.0.6723.58
https://chromereleases.googleblog.com/2024/10/stable-channel-update-for-desktop_15.html

This update includes 17 security fixes.

CVEs:
CVE-2024-9954 CVE-2024-9955 CVE-2024-9956 CVE-2024-9957 CVE-2024-9958
CVE-2024-9959 CVE-2024-9960 CVE-2024-9961 CVE-2024-9962 CVE-2024-9963
CVE-2024-9964 CVE-2024-9965 CVE-2024-9966
2024-10-18 01:56:56 +02:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Philip Taron
642bfd678c
chromium: remove with statements 2024-08-18 06:31:13 -07:00
emilylange
b80f73df94
chromium: prepare for M127 2024-07-25 23:45:25 +02:00
Jan Tojnar
5c5c20919b adwaita-icon-theme: Move from gnome scope to top-level
It is widely used outside gnome – although it probably should not be.
2024-07-01 08:26:46 +02:00
Alyssa Ross
9a95b60a38
chromium: remove unused arguments 2024-06-11 12:35:38 +02:00
Alyssa Ross
a71762621b
electron: fix build
Just like with Firefox, we need to make sure there's only a single
version of LLVM involved in building Chromium, or we get errors like
this:

	ld.lld: error: Invalid record (Producer: 'LLVM18.1.7' Reader: 'LLVM 17.0.6')

Fixes: 23d4f83453 ("cargo,clippy,rustc,rustfmt: 1.77.2 -> 1.78.0")
2024-06-10 19:18:36 +02:00
emilylange
0333f6c792
chromium: remove internal widevine drv in favor of widevine-cdm
This gets rid of a lot of redundant logic that is already present in the
`widevine-cdm` package :)

The resulting directory structure is the same and works just as well.
2024-05-13 01:21:58 +02:00
emilylange
e15783154f
chromium: improve and move recompressTarball
Recap: We need that (arguably stupid) helper function/drv because the
chromium tarball is big -- and is likely to increase even more in the
future. So big, that we eventually exceeded hydra.nixos.org's
max-output-limit (3G).  Instead of raising global hydra's limit, it was
decided that we recompress the tarball after deleting unused vendored
files from it.

I spent a lot of time on a version/prototype that does everything
(downloading, decompression, tar extraction, deleting unused files,
reproducible tar recreation and finally recompression) via stdin but
eventually had to scratch that.

GNU tar does not allow to create a tarball just from stdin, nixpkgs'
stdenv isn't built with stdin/stdout/pipes in mind, and things a lot of
other things I probably already forgot.

Nonetheless, this version improves multiple things:
- No more `mv` (used to be multiple, not just ours, since fetchzip had
  some as well)
- No more `rm` to get rid of the extracted files before recompressing.
  Instead, we simply don't extract them in the first place (thanks to
  tar's --exlude).
- No more "no space left" that happened due to `downloadToTemp = true;`.
- Multithreaded xz decompression, since that commit is still in
  staging-next.

We cannot use stdenv's unpackFile() because that does not allow us to
specify the needed --exclude (and --strip-components=1 if we don't want
to rely on glob matching).

The hash changed because we now have a static base directory ("source")
in the tarball, instead of whatever upstream provided us with (e.g.
"chromium-120.0.6099.129").
2024-01-04 01:34:15 +01:00
Yureka
930e3e5be6 chromium: use llvm 17 2023-12-17 02:09:25 +01:00
Yureka
17ca7f6529 chromium: fix build for chromium >=120 2023-12-05 19:38:31 +01:00
networkException
e2523b4ca0
chromium,chromedriver,electron: use hash instead of sha256 everywhere
this patch updates the packaging of chromium and chromedriver to use
sri hashes in `upstream-info.nix` instead of sha256 as well as
the packaging of electron to use sri hashes in `info.json` instead
of sha256 (just gn).

this patch also updates the previous `sha256` values in
`upstream-info.nix` and `info.json` to sri hashes in `hash`.
2023-10-21 19:56:40 +02:00
Yureka
b006049b42 chromium: changes required for electron 2023-09-28 11:44:17 +02:00
Artturi
4055d18ccc
Merge pull request #229265 from amjoseph-nixpkgs/pr/chromium/cross/all 2023-08-04 06:04:33 +03:00
emilylange
68c59791fb
chromium,ungoogled-chromium: fix ofborg maintainer pings
ofborg uses `builtins.unsafeGetAttrPos` internally, to figure out which
maintainers need to be pinged.

e.g:
`builtins.unsafeGetAttrPos "version" drv`

When using a `.json` file containing the version via `lib.importJSON`,
this will always return `null` and thus leading to no pings at all.

This commit works around this, resulting in properly working pings
for any changes to the upstream-info file.

A similar thing has been done for element-{web,desktop} in the past.
2023-08-02 12:17:42 +02:00
Felix Bühler
0a2745684e
Merge pull request #239624 from Stunkymonkey/use-optionalString-then
treewide: use optionalString instead of 'then ""'
2023-07-22 13:02:47 +02:00
Adam Joseph
5f3c644b1a chromium: control llvmPackages version selection with a string
Sometimes we access `llvmPackages` via `pkgs`, and other times via
`pkgsFooBar`, so unfortunately a string (attrname) is the only way
to have a single point of control over the LLVM version used for
both buildPlatform and hostPlatform.
2023-07-05 03:32:16 -07:00
Adam Joseph
53af611dd2 chromium: invoke ungoogled-chromium via buildPackages
ungoogled-chromium is, contrary to its name, not a build of
chromium.  It is a patched copy of chromium's *source
code*. Therefore, it needs to come from pkgsBuildBuild, because it
contains python scripts which get /nix/store/.../bin/python3 patched
into their shebangs.
2023-07-05 03:32:16 -07:00
Adam Joseph
c25897c1f3 chromium: take llvmPackages from pkgsBuildTarget
`llvmPackages.clang` is used in the `gnFlags` attrset, so we need to
indicate explicitly which "on" platform (the build) and which "for"
platform (the host) we want.  This commit does that.
2023-07-05 03:32:16 -07:00
Adam Joseph
758bf4cb8a chromium: late-bind xdg-utils if broken
xdg-utils does not cross-compile.  Let's late-bind (using the
runtime $PATH) in this scenario so a native-built xdg-utils can be
used instead.
2023-07-05 03:32:15 -07:00
Felix Buehler
f3719756b5 treewide: use optionalString instead of 'then ""' 2023-06-24 20:19:19 +02:00
Adam Joseph
58c67d2bdb chromium: take gnChromium from buildPackages
${gnChromium}/bin/gn needs to be compiled for the buildPlatform
since it is run at build time.
2023-06-20 22:11:27 -07:00
Michael Weiss
d0bfc9077d
ungoogled-chromium: 112.0.5615.165 -> 113.0.5672.64 2023-05-04 23:53:49 +02:00
Michael Weiss
92df61ada1
chromium: 112.0.5615.165 -> 113.0.5672.63
https://chromereleases.googleblog.com/2023/05/stable-channel-update-for-desktop.html

This update includes 15 security fixes.

CVEs:
CVE-2023-2459 CVE-2023-2460 CVE-2023-2461 CVE-2023-2462 CVE-2023-2463
CVE-2023-2464 CVE-2023-2465 CVE-2023-2466 CVE-2023-2467 CVE-2023-2468
2023-05-04 00:00:55 +02:00
aleksana
23caee0f0a chromium: fix gtk4 schema paths 2023-04-29 03:42:59 +08:00
Michael Weiss
175a86d3b6
ungoogled-chromium: 110.0.5481.177 -> 111.0.5563.65 2023-03-09 22:02:54 +01:00
Michael Weiss
319cc6ca35
chromium{Beta,Dev}: Switch to LLVM 15
Not required yet but we should always use the latest LLVM version that
is available in Nixpkgs as Google builds Chromium against commits from
the main branch.
2023-03-06 22:43:18 +01:00
Michael Weiss
04b1a12a6e
chromium: Support GTK 4
Chromium can be launched with `--gtk-version=4` but this didn't work as
the binary must be able to dlopen() libgtk-4.so.1 [0].

This fixes #214392.

Co-Authored-By: Sávio <25729991+saviosg@users.noreply.github.com>

[0]: https://source.chromium.org/chromium/chromium/src/+/main:ui/gtk/gtk_compat.cc;l=85;drc=3e1a26c44c024d97dc9a4c09bbc6a2365398ca2c
2023-02-19 13:40:23 +01:00
Sandro
3d14bd27f4
Merge pull request #206401 from imsofi/chromium-wrapper
chromium: fix web app linking
2023-01-19 03:15:07 +01:00
Michael Weiss
c9ca13ce9a
chromium: Drop passthru.updateScript
The update script for Chromium does not behave like other update
scripts, e.g., it updates all channels and ungoogled-chromium (not just
a single package). This causes issues when r-ryantm (the bot that runs
nixpkgs-update) tries to update chromium and ungoogled-chromium (which
it started to do recently):
- https://github.com/NixOS/nixpkgs/pull/207185
- https://github.com/NixOS/nixpkgs/pull/207482
- https://github.com/NixOS/nixpkgs/pull/207596
- https://github.com/NixOS/nixpkgs/pull/208048
- https://github.com/NixOS/nixpkgs/pull/208287

We could make the update script work as expected by other tooling but
Chromium requires special attention anyway so it might also be for the
best to do it manually for now (at least someone needs to ensure that
the correct labels are set and that security fixes (~ all updates) are
backported).
2023-01-01 18:07:17 +01:00
Sofi
1ddba4aadb
chromium: fix web app linking
Currently Chromium will generate its Web App shortcuts by pointing to
the current unwrapped executable of itself. This leads to all Web App
shortcuts failing to launch as it is not launched trough nixpkgs's
wrapper.

This fix will set the `CHROME_WRAPPER` environment variable to point
to a valid wrapper script, allowing chromium based browsers to generate
valid `.desktop` files.

NOTE: As these files are only set once by the browser inside of
`~/.local/share/applications` and not updated, this fix will only work
for generating new shortcuts, and only work as long as the relevant
binary is available in `$PATH` for that user.

INFO: While generic sounding, `CHROME_WRAPPER` is only invoked inside of
`web_app_shortcut_linux.cc`[^1], so it should only affect the generation
of web app shortcut files.

INFO: There is a similar patch for google-chrome itself in nixpkgs.[^2]

[^1]: https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/shell_integration_linux.cc;l=405;drc=b8f43a4e55639b03f76eccc6f6b951f2d06b8833
[^2]: https://github.com/NixOS/nixpkgs/pull/155430/
2022-12-16 14:37:45 +01:00
Paul Grandperrin
aeaeca819d NIXOS_OZONE_WL: fix wayland window decorations 2022-09-28 15:56:55 +02:00
Stefan Radziuk
d32eae0f23
chromium: add commandLineArgs after wayland flags (#189371) 2022-09-02 01:38:22 +02:00
Sandro
fea8433edb
Merge pull request #159316 from georgyo/chromium_krb5 2022-08-19 15:10:29 +02:00
Jan Tojnar
e3e625ffe4 chromium: remove unused GConf dependency
GConf has been deprecated for ages and support for it removed from Chromium a while ago:

- Removal of `use_gconf` gn build system flag:
  a28f4d062f
2022-04-10 03:54:39 +02:00
Jan Tojnar
e8c84f90ed chromium: remove deprecated libgnome-keyring dependency
libgnome-keyring has been deprecated for a long time.
It has been superseded by libsecret, which allows access to not only
GNOME Keyring secret manager but any other service implementing
the Secret Service D-Bus API.

In fact Chromium links against libsecret when use_glib is enabled:

https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/BUILD.gn;l=142;drc=35be6215ec8f09e50176f36753c68f26c63d1885

And use_glib is on by default on Linux:

https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/BUILD.gn;l=142;drc=35be6215ec8f09e50176f36753c68f26c63d1885

Unfortunately, Chromium is vendoring libsecret:

https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/BUILD.gn;l=187;drc=35be6215ec8f09e50176f36753c68f26c63d1885

We need to disable the flag explicitly, since it is enabled by default:

https://source.chromium.org/chromium/chromium/src/+/main:components/os_crypt/features.gni;l=11;drc=35be6215ec8f09e50176f36753c68f26c63d1885
2022-04-10 03:54:39 +02:00
Felix Buehler
e0476d93fe treewide: rename name to pname&version 2022-03-23 22:34:54 +01:00
Michael Weiss
16fbf26530
ungoogled-chromium: 98.0.4758.102 -> 99.0.4844.51 2022-03-05 21:35:03 +01:00
Michael Weiss
c0952b6478
chromium{Beta,Dev}: Switch to LLVM 14
This fixes the following build error:
[24751/48400] ACTION //components/url_formatter/spoof_checks/top_domains:generate_top_domain_list_variables_file(//build/toolchain/linux/unbundle:default)d_tmp/browser_command.mojom-webui.js.mojom-webui.jsui.js
FAILED: gen/components/url_formatter/spoof_checks/top_domains/top500-domains-inc.cc
python3 ../../build/gn_run_binary.py make_top_domain_list_variables ../../components/url_formatter/spoof_checks/top_domains/domains.list top500_domains gen/components/url_formatter/spoof_checks/top_domains/top500-domains-inc.cc
make_top_domain_list_variables failed with exit code -4

The "make_top_domain_list_variables" program fails due to a SIGILL error
(illegal instruction). See:
- https://bugs.chromium.org/p/chromium/issues/detail?id=1273966
  - https://reviews.llvm.org/D115015
  - https://bugs.chromium.org/p/chromium/issues/detail?id=1269407
2022-02-28 12:34:07 +01:00
Michael Weiss
37a19c55df
chromium: Suffix instead of prefix ${xdg-utils}/bin to $PATH
This is important so that users can choose to use other implementations
(e.g., self-written Bash scripts).
We only provide xdg-utils as a fallback in case the system isn't
properly configured.
2022-02-26 12:53:25 +01:00
George Shammas
acef4bfe61 chromium: improve kerberos support 2022-02-11 13:51:42 -05:00
Wout Mertens
ee1c5b7856 chromium: no need to eval makeWrapper 2022-02-02 12:09:06 +01:00
Wout Mertens
b2eb5f62a7 wayland: enable ozone via $NIXOS_OZONE_WL
Chrome, Chromium, VSCode, Slack, Signal, Discord, element-desktop,
schildichat.

For the latter two, the feature flag useWayland was removed and a
wrapper script was provided.
2022-01-27 09:46:36 +01:00
Michael Weiss
f8b837c808
ungoogled-chromium: 92.0.4515.159 -> 93.0.4577.82 2021-09-19 13:15:16 +02:00
Michael Weiss
186315def7
chromium: Move the version helper functions into default.nix
Those functions can be required anywhere in the Nix expressions for
Chromium and therefore they should be defined in default.nix and
inherited where necessary.

This fixes the chromiumBeta build which failed because I forgot to
update the channel conditional when the beta channel advanced to M94.
This is exactly why the version based conditionals should be used
everywhere.
2021-08-28 23:27:55 +02:00
Michael Weiss
403ce1a9a3
chromiumBeta: Build with LLVM 13 2021-08-12 22:50:11 +02:00
Michael Weiss
1e372f4004
chromiumDev: Fix the build
Note: I've only tested this with llvmPackages_git but it should work
with llvmPackages_13 as well.

fieldtrial_testing_like_official_build was renamed to
disable_fieldtrial_testing_config:
486e9d58c0
2021-08-04 17:59:00 +02:00
Felix Buehler
2ae5f1a6b8 chromium: remove phases 2021-08-03 23:23:01 +02:00
Michael Weiss
bb651d27fd
chromium: Fix the Ozone/Wayland support
The stable channel update to M92 (97570d30c7) broke the Wayland support:
$ chromium --enable-features=UseOzonePlatform --ozone-platform=wayland
[31712:31712:0721/114725.940557:ERROR:wayland_connection.cc(137)] Failed to load wayland client libraries.
[31712:31712:0721/114725.940641:FATAL:ozone_platform_wayland.cc(177)] Failed to initialize Wayland platform
[0721/114725.947566:ERROR:process_memory_range.cc(75)] read out of range
Trace/breakpoint trap (core dumped)
2021-07-21 11:52:12 +02:00
Michael Weiss
97570d30c7
chromium: 91.0.4472.164 -> 92.0.4515.107
https://chromereleases.googleblog.com/2021/07/stable-channel-update-for-desktop_20.html

This update includes 35 security fixes.

CVEs:
CVE-2021-30565 CVE-2021-30566 CVE-2021-30567 CVE-2021-30568
CVE-2021-30569 CVE-2021-30571 CVE-2021-30572 CVE-2021-30573
CVE-2021-30574 CVE-2021-30575 CVE-2021-30576 CVE-2021-30577
CVE-2021-30578 CVE-2021-30579 CVE-2021-30580 CVE-2021-30581
CVE-2021-30582 CVE-2021-30583 CVE-2021-30584 CVE-2021-30585
CVE-2021-30586 CVE-2021-30587 CVE-2021-30588 CVE-2021-30589

Note: This won't be the smoothest update. Chromium seems to be fine but
requires gtk3 in $LD_LIBRARY_PATH to find libgtk-3.so.0 (otherwise it
crashes during startup) but Google Chrome fails to initialize
("GPU process exited unexpectedly: exit_code=132") and requires
"--use-gl=angle --use-angle=swiftshader" for hardware(?) acceleration
(which seems to work work fine and performant but SwiftShader should
actually use the CPU instead of the GPU).
2021-07-21 11:20:38 +02:00