Commit Graph

304 Commits

Author SHA1 Message Date
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
sternenseemann
524aa1c87c chromium: move ed and makeWrapper into nativeBuildInputs
This most notably fixes cross _evaluation_ of chromium which previously
would fail because makeWrapper relies on runtimeShell which is not
available in the HostTarget package set.

I tested that the native chromium build still works, but haven't tried
cross compiling it yet. There very well may be additional errors, but at
least they will be build errors, not hard to understand evaluation
errors.
2021-07-05 14:58:52 +02:00
Jan Tojnar
468cb5980b gnome: rename from gnome3
Since GNOME version is now 40, it no longer makes sense to use the old attribute name.
2021-05-08 09:47:42 +02:00
Michael Weiss
5768ccf6fe
chromium{Beta,Dev}: Fix the linking
Linking with ThinLTO (required for CFI) was failing as I forgot use
stdenv from llvmPackages_12 in 166520812e (need to refactor that part).
2021-04-09 12:09:59 +02:00
Michael Weiss
166520812e
chromium{Beta,Dev}: Use LLVM 12
LLVM 12 is required but the build still fails due to other changes that
where introduced in the meantime (and Chromium 90.0.4430.51 introduced
another LLVM failure).
2021-04-02 13:32:17 +02:00
Michael Weiss
14e11862ea
chromium: Remove the enableVaapi flag/option
Chromium is still compiled with use_vaapi=true but since M89 the
--enable-accelerated-video-decode was replaced with
--enable-features=VaapiVideoDecoder.

Instead of updating our wrapper it seems like a better idea to drop
enableVaapi entirely and let users use commandLineArgs or
chrome://flags/ to enable hardware accelerated video decoding.
2021-03-13 16:38:42 +01:00
Michael Weiss
36e5fe006a
chromium: Switch from PipeWire 0.2 to the current 0.3.x releases
This should make it work more reliable and support additional features
like window sharing. See [0] for more details.

[0]: https://jgrulich.cz/2020/12/18/webrtc-chromium-updates-in-2020/
2021-03-04 17:53:06 +01:00
Michael Weiss
d55603f11d
chromium: Remove the Adobe Flash Player plugin support
The Flash support was completely removed in Chromium M88:
- https://www.chromium.org/flash-roadmap#TOC-Flash-Support-Removed-from-Chromium-Target:-Chrome-88---Jan-2021-
- https://chromestatus.com/feature/5643527180517376

See #110314.
2021-02-07 12:27:36 +01:00
Jan Tojnar
54f4529aec
Merge pull request #111519 from siraben/xdg-utils-naming 2021-02-01 17:18:57 +01:00
Ben Siraphob
a6ac3eedbd treewide: xdg_utils -> xdg-utils 2021-02-01 15:05:09 +07:00
Michael Weiss
268600e6b7
ungoogled-chromium: 87.0.4280.141 -> 88.0.4324.104
Unfortunately this requires a crazy hack to support building with
Google's proprietary Widevine DRM technology as that requires fetching
the Google Chrome sources (see also 86ff1e45ce).
The hack is required because ungoogled-chromium doesn't always use tags
that correspond to a Google Chrome release.
2021-01-30 19:22:22 +01:00
Ben Siraphob
badf51221d treewide: stdenv.lib -> lib 2021-01-16 17:58:11 +07:00