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

awesome: add optional gtk3 support #61161

Merged
merged 1 commit into from
May 11, 2019
Merged

awesome: add optional gtk3 support #61161

merged 1 commit into from
May 11, 2019

Conversation

stefano-m
Copy link
Contributor

Motivation for this change

Add optional gtk3 support to Awesome so that the beautiful.gtk module can be
used.

The beautiful.gtk uses lgi to obtain Gtk via gobject-introspect:

return require('lgi').Gtk

Since the current build does not include the typelib files needed, the above
call fails.

It turns out that both gtk3 and atk (Accessibility toolkit) are needed, so
this commit adds them as optional build inputs.

Setting gtk3Support to true e.g. in an overlay will make beautiful.gtk
work at the cost of an increased closure size (currently 99.6M vs 223.4M).

Fixes #60538

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@stefano-m
Copy link
Contributor Author

It would be nice if this could be backported to 19.03 as it's backwards-compatible.

Thanks.

@ofborg ofborg bot requested review from lovek323 and rasendubi May 8, 2019 21:02
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels May 8, 2019
@rasendubi
Copy link
Member

@GrahamcOfBorg build awesome

Add optional gtk3 support to Awesome so that the `beautiful.gtk` module can be
used.

The `beautiful.gtk` uses `lgi` to obtain Gtk via gobject-introspect:

    return require('lgi').Gtk

Since the current build does not include the typelib files needed, the above
call fails.

It turns out that both `gtk3` and `atk` (Accessibility toolkit) are needed, so
this commit adds them as optional build inputs.

Setting `gtk3Support` to `true` e.g. in an overlay will make `beautiful.gtk`
work at the cost of an increased closure size (currently 99.6M vs 223.4M).

Fixes #60538
@stefano-m
Copy link
Contributor Author

@jtojnar @rasendubi I have fixed the conflicts that occurred while waiting for the merge.

Rebuilding caused no issues at all.

Hopefully this might go in soon if you agree.

Thanks.

@rasendubi rasendubi merged commit dedda37 into NixOS:master May 11, 2019
@rasendubi
Copy link
Member

Thank you!

We could also add awesome with gtk3 support to top-level/all-packages.nix, for users to benefit from the package pre-built by Hydra.

@stefano-m
Copy link
Contributor Author

Thanks @rasendubi, any chance at all this can land in the 19.03 branch?

We could also add awesome with gtk3 support to top-level/all-packages.nix

Cool, if I get time I can whip up an PR for that.

@rasendubi
Copy link
Member

@stefano-m yeah, I don't see why not. Just submit a PR against release-19.03 branch and cc me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Awesome 4.3: beautiful.gtk is not supported
3 participants