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

gtk4: init at 4.0.2 #107405

Merged
merged 1 commit into from Jan 31, 2021
Merged

gtk4: init at 4.0.2 #107405

merged 1 commit into from Jan 31, 2021

Conversation

andir
Copy link
Member

@andir andir commented Dec 22, 2020

Motivation for this change

This is some initial work for getting GTK4 to compile as I wanted to get
a rough feeling how much effort it is.

https://gitlab.gnome.org/GNOME/gtk/-/blob/4.0.0/NEWS
https://blog.gtk.org/2020/12/16/gtk-4-0/

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@jtojnar
Copy link
Contributor

jtojnar commented Dec 27, 2020

The pkg-config file is mangled, preventing programs from building https://gitlab.gnome.org/GNOME/gtk/-/issues/3517.

@tadfisher
Copy link
Contributor

4.0.2 was shipped, so I think we can drop the patch.

Any other blockers to getting this merged?

@jtojnar
Copy link
Contributor

jtojnar commented Jan 21, 2021

The main burden is that we need to evaluate how does the GStreamer and GL support work – that is, does it crash without a wrapper.

pkgs/development/libraries/gtk/4.x.nix Outdated Show resolved Hide resolved
pkgs/development/libraries/gtk/4.x.nix Outdated Show resolved Hide resolved
@tadfisher
Copy link
Contributor

tadfisher commented Jan 21, 2021

@jtojnar Not sure if this is an issue with the vulkan package, but nixpkgs#vulkan-loader.dev lists a non-existing includedir in vulkan.pc:

includedir=/nix/store/42qxa7x1v13c6bmbsl0cs94cicpygqma-vulkan-loader-1.2.162.0-dev/include

This is causing lots of directory-not-found warnings when building, but it does build. However, gstreamer applications fail to run because of a missing playbin element.

edit PR to fix vulkan-loader here: #108890

@tadfisher
Copy link
Contributor

Need to add graphene to propagatedBuildInputs as well; at least gtk4-rs won't build without it.

@tadfisher
Copy link
Contributor

Does it make sense to add vulkan-loader to propagatedNativeBuildInputs so downstream dependencies can locate vulkan via pkg-config?

@jtojnar
Copy link
Contributor

jtojnar commented Jan 22, 2021

I have no idea about GL stack but rule of thumb is: propagate when listed in Requires in a pkg-config file, do not propagate if listed in Requires.private or there are multiple libraries and only a small subset of them requires the dependency and the libraries are not commonly linked.

Major API change; adds multimedia and 3D graphics widgets.

Changes:
- https://gitlab.gnome.org/GNOME/gtk/-/blob/4.0.2/NEWS
- https://blog.gtk.org/2020/12/16/gtk-4-0/

Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
Co-authored-by: Tad Fisher <tadfisher@gmail.com>
@jtojnar jtojnar changed the title WIP: support gtk4 gtk4: init at 4.0 Jan 23, 2021
@jtojnar jtojnar changed the title gtk4: init at 4.0 gtk4: init at 4.0.2 Jan 23, 2021
@jtojnar jtojnar marked this pull request as ready for review January 23, 2021 16:09
@jtojnar
Copy link
Contributor

jtojnar commented Jan 31, 2021

Let’s merge this for now. We will need to create wrapGapps4Hook but we can deal with that later.

@jtojnar jtojnar merged commit 44b0765 into NixOS:master Jan 31, 2021
@jtojnar
Copy link
Contributor

jtojnar commented Jan 31, 2021

Eh, turns out there has been a new release yesterday: https://gitlab.gnome.org/GNOME/gtk/-/blob/4.1.0/NEWS#L1-53

@andir
Copy link
Member Author

andir commented Jan 31, 2021

Woohoo! Thanks for merging and working on this. I totally didn't except that to happen this quickly :-)

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.

None yet

3 participants