Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webkitgtk: add support for experimental features #280554

Conversation

lilyinstarlight
Copy link
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.

@SuperSandro2000
Copy link
Member

SuperSandro2000 commented Jan 19, 2024

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
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
Copy link
Member

jtojnar commented Jan 19, 2024

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
Member

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

@jtojnar
Copy link
Member

jtojnar commented Jan 20, 2024

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
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?

Copy link
Contributor

@amaxine amaxine left a comment

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
Member

Would love to have webrtc working in Dorion 👍

@thenbe
Copy link
Contributor

thenbe commented Feb 15, 2024

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
27 tasks
Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

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
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
24 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants