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

Conversation

@stefano-m
Copy link
Contributor

commented May 8, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented May 8, 2019

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

Thanks.

@rasendubi

This comment has been minimized.

Copy link
Member

commented May 8, 2019

@GrahamcOfBorg build awesome

awesome: add optional gtk3 support
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

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2019

@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

13 checks passed

Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@rasendubi

This comment has been minimized.

Copy link
Member

commented May 11, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2019

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

This comment has been minimized.

Copy link
Member

commented May 12, 2019

@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
Projects
None yet
3 participants
You can’t perform that action at this time.