-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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 4.3: beautiful.gtk is not supported #60538
Comments
It should not be necessary to use See #43150 for docs on |
Thanks, I'll have a look. For the record, I used I am still keen on hearing what the correct solution would be regarding how to add support (closure size, optional arguments etc.). Thanks. |
@jtojnar thanks for our suggestions. Here are my thoughts:
|
|
¯_(ツ)_/¯ maybe it's got less dependencies built than the
I see, I somehow missed that.
It seems that #60229 (comment) In the end, AwesomeWM should not need the whole of gtk, I think that gtk should be made optional so one can turn it on or off.
Thanks, I did notice that and I'll keep an eye on it |
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 NixOS#60538
Cc: @dtzWill
Issue description
First of all, thanks to everyone for working on NixOS.
Awesome 4.3 has a module called beautiful.gtk, it allows
It can be used for theming, as shown in Awesome's example gtk theme.
However, the current build does not include the typelib files needed by the module making it unusable.
Investigation
The beautiful.gtk implementation uses lgi to obtain
Gtk
via gobject-introspecSince the current build does not include the typelib files needed, the above call fails.
After some experimentation, I found out that both
gtk3-x11
andatk
are needed.For example:
lua
and try to load Gtk: fails withTypelib file for namespace 'Gtk' (any version) not found
gtk3-x11
(the package that actually includes the typelib file) and add thegirepository-1.0
folder to theGI_TYPELIB_PATH
environment variable: fails withTypelib file for namespace 'Atk', version '1.0' not found
atk
and add it toGI_TYPELIB_PATH
and finallyGtk
loads.Steps to reproduce
~/.config/awesome/rc.lua
to load the example gtk themePossible solution
I suggest that both
atk
andgtk-x11
are added as build inputs to the awesome package, I tried this out and it actually works. The catch is that the closure size increases by 123.9M:build awesome without gtk3-x11 and atk
nix path-info ./result | grep awesome
-> 99.6Mbuild awesome with gtk3-x11 and atk
nix path-info ./result | grep awesome
-> 223.4MSo, instead of adding the packages unconditionally, we could add an optional flag, like e.g.
withGtkSupport
, defaulting to false. In this way, one could always build awesome and add it toservices.xserver.windowManager.awesome.package
. Ideally one could even add something likeawesome-gtk3
to the top levelnixpkgs
, a bit likegtk3-x11
:nixpkgs/pkgs/top-level/all-packages.nix
Lines 10312 to 10314 in 6d7ed96
If a decision is made, I'd be happy to submit a PR.
Technical details
"x86_64-linux"
Linux 4.19.36-hardened, NixOS, 19.03.172361.cf3e277dd0b (Koi)
yes
yes
nix-env (Nix) 2.2.2
"nixos-19.03.172361.cf3e277dd0b"
"unstable-19.09pre177249.dfd8f84aef1"
/nix/var/nix/profiles/per-user/root/channels/nixos
awesome 4.3 (Too long)
The text was updated successfully, but these errors were encountered: