Skip to content

webkitgtk: add support for experimental features - #280554

Merged
SuperSandro2000 merged 1 commit into
NixOS:masterfrom
lilyinstarlight:feature/webkitgtk-experimental-features-switch
Jun 6, 2024
Merged

SuperSandro2000 merged 1 commit into
NixOS:masterfrom
lilyinstarlight:feature/webkitgtk-experimental-features-switch

Conversation

@lilyinstarlight

Copy link
Copy Markdown
Member

Description of changes

Some webkitgtk consumers (e.g. Tauri apps) can benefit from and use WebRTC, but we do not make the necessary experimental features available currently. This provides an off-by-default boolean switch to allow enabling them for downstream packages

If the maintainers would like, we could flip this to on-by-default, since I do not believe they necessarily cause problems in applications that do not use them. But I will leave it up to you and will adjust the PR accordingly if that is requested

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.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg Bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux. labels Jan 12, 2024
@SuperSandro2000

SuperSandro2000 commented Jan 19, 2024 •

Copy link
Copy Markdown
Member

we could flip this to on-by-default, since I do not believe they necessarily cause problems in applications that do not use them.

I think it would be cool, if we could avoid the extra webkitgtk build if we could clarify how this would affect applications that do not use it. I am going to try to forward this to people who maybe can answer that. (mixed this up with qtwebview)

@nyabinary

Copy link
Copy Markdown
Contributor

we could flip this to on-by-default, since I do not believe they necessarily cause problems in applications that do not use them.

I think it would be cool, if we could avoid the extra webkitgtk build if we could clarify how this would affect applications that do not use it. I am going to try to forward this to people who maybe can answer that. (mixed this up with qtwebview)

I agree that it would be nice if we could just set experimental features to default to on.

@jtojnar

jtojnar commented Jan 19, 2024

Copy link
Copy Markdown
Member

If the maintainers would like, we could flip this to on-by-default, since I do not believe they necessarily cause problems in applications that do not use them.

Would be nice to see some docs/research on the actual impact.

@SuperSandro2000

Copy link
Copy Markdown
Member

I've tried to research that but only really could find this https://trac.webkit.org/changeset/208495/webkit

@jtojnar

jtojnar commented Jan 20, 2024

Copy link
Copy Markdown
Member

Hmm, looks like those include Web APIs (e.g. CSS features) so we should really not enable them by default.

For example, a website could have been using CSS grid, a feature that would have been previously ignored. Because it had been unstable at the time, I can imagine enabling it could have broken such website’s layout, or even crashed Epiphany and other webkitgtk based browsers.

@nyabinary

Copy link
Copy Markdown
Contributor

Hmm, looks like those include Web APIs (e.g. CSS features) so we should really not enable them by default.

For example, a website could have been using CSS grid, a feature that would have been previously ignored. Because it had been unstable at the time, I can imagine enabling it could have broken such website’s layout, or even crashed Epiphany and other webkitgtk based browsers.

So the pr in it current state should be good, since experimental is not enabled by with this, right?

@amaxine amaxine left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is this still triggers a pointless rebuild, and if this override is enabled for any packages directly in nixpkgs that's an immediate +1 on the already painful number of rebuilds whenever webkitgtk has updates.

But I'd agree that in its current state, where this is not enabled by default for any packages and just provides a trivial way of overriding this for your own use, it seems fine.

@surfaceflinger

Copy link
Copy Markdown
Member

Would love to have webrtc working in Dorion 👍

@thenbe

thenbe commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

I'm currently using a flake similar to this to enable WebRTC for Tauri v2 (via webkitgtk_4_1), and it'd be cool to avoid rebuilds.

@nyabinary nyabinary mentioned this pull request Apr 8, 2024
21 of 27 tasks

@SuperSandro2000 SuperSandro2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just decided power of my watered soup, that this is good to go

@SuperSandro2000

Copy link
Copy Markdown
Member

I've build webkitgtk_6_0, webkitgtk, webkitgtk_4_1 and webkitgtk.overrideAttrs { enableExperimental = true; } locally after a rebase and things work as expected.

@SuperSandro2000
SuperSandro2000 merged commit 2d23e86 into NixOS:master Jun 6, 2024
@lilyinstarlight
lilyinstarlight deleted the feature/webkitgtk-experimental-features-switch branch June 6, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 101-500 This PR causes between 101 and 500 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants