summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/window-managers/awesome
diff options
context:
space:
mode:
authorStefano Mazzucco <stefano@curso.re>2019-05-02 23:10:42 +0100
committerStefano Mazzucco <stefano@curso.re>2019-05-11 17:36:54 +0100
commit75886e3b4756cdfab1c5da065c40ab4aceb2b8ef (patch)
tree8b703951a68868d4d45cc6f121f83486b7a9d386 /pkgs/applications/window-managers/awesome
parent56cb15b5fc5a4b5211a50dea4455235391c3c638 (diff)
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 https://github.com/NixOS/nixpkgs/issues/60538
Diffstat (limited to 'pkgs/applications/window-managers/awesome')
-rw-r--r--pkgs/applications/window-managers/awesome/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/window-managers/awesome/default.nix b/pkgs/applications/window-managers/awesome/default.nix
index 58b80aae0cf8..25438c816055 100644
--- a/pkgs/applications/window-managers/awesome/default.nix
+++ b/pkgs/applications/window-managers/awesome/default.nix
@@ -6,8 +6,12 @@
, libxkbcommon, xcbutilxrm, hicolor-icon-theme
, asciidoctor
, fontsConf
+, gtk3Support ? false, gtk3 ? null
}:
+# needed for beautiful.gtk to work
+assert gtk3Support -> gtk3 != null;
+
with luaPackages; stdenv.mkDerivation rec {
name = "awesome-${version}";
version = "4.3";
@@ -42,7 +46,8 @@ with luaPackages; stdenv.mkDerivation rec {
xorg.libXau xorg.libXdmcp xorg.libxcb xorg.libxshmfence
xorg.xcbutil xorg.xcbutilimage xorg.xcbutilkeysyms
xorg.xcbutilrenderutil xorg.xcbutilwm libxkbcommon
- xcbutilxrm ];
+ xcbutilxrm ]
+ ++ stdenv.lib.optional gtk3Support gtk3;
#cmakeFlags = "-DGENERATE_MANPAGES=ON";
cmakeFlags = "-DOVERRIDE_VERSION=${version}";
@@ -54,7 +59,7 @@ with luaPackages; stdenv.mkDerivation rec {
LUA_PATH = "${lgi}/share/lua/${lua.luaversion}/?.lua;;";
postInstall = ''
- # Don't use wrapProgram or or the wrapper will duplicate the --search
+ # Don't use wrapProgram or the wrapper will duplicate the --search
# arguments every restart
mv "$out/bin/awesome" "$out/bin/.awesome-wrapped"
makeWrapper "$out/bin/.awesome-wrapped" "$out/bin/awesome" \