2022-05-14 09:10:53 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
|
|
|
, lua, cairo, librsvg, cmake, imagemagick, pkg-config, gdk-pixbuf
|
2015-09-15 10:26:18 +01:00
|
|
|
, xorg, libstartup_notification, libxdg_basedir, libpthreadstubs
|
2019-01-29 03:05:56 +00:00
|
|
|
, xcb-util-cursor, makeWrapper, pango, gobject-introspection
|
2019-02-14 09:23:20 +00:00
|
|
|
, which, dbus, nettools, git, doxygen
|
2016-03-27 16:14:46 +01:00
|
|
|
, xmlto, docbook_xml_dtd_45, docbook_xsl, findXMLCatalogs
|
2018-02-25 02:23:58 +00:00
|
|
|
, libxkbcommon, xcbutilxrm, hicolor-icon-theme
|
2019-01-28 17:12:35 +00:00
|
|
|
, asciidoctor
|
2019-04-27 19:54:07 +01:00
|
|
|
, fontsConf
|
2019-05-02 23:10:42 +01:00
|
|
|
, gtk3Support ? false, gtk3 ? null
|
2015-03-29 12:07:51 +01:00
|
|
|
}:
|
2010-03-04 14:44:56 +00:00
|
|
|
|
2019-05-02 23:10:42 +01:00
|
|
|
# needed for beautiful.gtk to work
|
|
|
|
assert gtk3Support -> gtk3 != null;
|
|
|
|
|
2021-09-11 23:00:03 +01:00
|
|
|
let
|
|
|
|
luaEnv = lua.withPackages(ps: [ ps.lgi ps.ldoc ]);
|
|
|
|
in
|
|
|
|
|
2019-10-17 17:03:19 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "awesome";
|
2019-01-28 17:12:35 +00:00
|
|
|
version = "4.3";
|
2017-11-28 18:35:35 +00:00
|
|
|
|
2017-03-19 15:26:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "awesomewm";
|
|
|
|
repo = "awesome";
|
|
|
|
rev = "v${version}";
|
2019-01-28 17:12:35 +00:00
|
|
|
sha256 = "1i7ajmgbsax4lzpgnmkyv35x8vxqi0j84a14k6zys4blx94m9yjf";
|
2010-03-04 14:44:56 +00:00
|
|
|
};
|
|
|
|
|
2022-05-14 09:10:53 +01:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix for -fno-common toolchain support:
|
|
|
|
# https://github.com/awesomeWM/awesome/pull/3065
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common-prerequisite.patch";
|
|
|
|
url = "https://github.com/awesomeWM/awesome/commit/c5202a48708585cc33528065af8d1b1d28b1a6e0.patch";
|
|
|
|
sha256 = "0sv36xf0ibjcm63gn9k3bl039sqavb2b5i6d65il4bdclkc0n08b";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://github.com/awesomeWM/awesome/commit/d256d9055095f27a33696e0aeda4ee20ed4fb1a0.patch";
|
|
|
|
sha256 = "1n3y4wnjra8blss7642jgpxnm9n92zhhjj541bb9i60m4b7bgfzz";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2016-03-27 16:14:46 +01:00
|
|
|
nativeBuildInputs = [
|
2013-11-13 02:34:49 +00:00
|
|
|
cmake
|
|
|
|
doxygen
|
2016-03-27 16:14:46 +01:00
|
|
|
imagemagick
|
|
|
|
makeWrapper
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2017-11-28 18:35:35 +00:00
|
|
|
xmlto docbook_xml_dtd_45
|
2017-03-19 15:26:22 +00:00
|
|
|
docbook_xsl findXMLCatalogs
|
2019-01-28 17:12:35 +00:00
|
|
|
asciidoctor
|
2016-03-27 16:14:46 +01:00
|
|
|
];
|
2017-11-28 18:35:35 +00:00
|
|
|
|
2019-04-27 19:54:07 +01:00
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
FONTCONFIG_FILE = toString fontsConf;
|
|
|
|
|
2018-02-25 02:23:58 +00:00
|
|
|
propagatedUserEnvPkgs = [ hicolor-icon-theme ];
|
2019-05-22 12:03:39 +01:00
|
|
|
buildInputs = [ cairo librsvg dbus gdk-pixbuf gobject-introspection
|
2021-09-11 23:00:03 +01:00
|
|
|
git luaEnv libpthreadstubs libstartup_notification
|
2017-02-17 00:22:38 +00:00
|
|
|
libxdg_basedir lua nettools pango xcb-util-cursor
|
|
|
|
xorg.libXau xorg.libXdmcp xorg.libxcb xorg.libxshmfence
|
|
|
|
xorg.xcbutil xorg.xcbutilimage xorg.xcbutilkeysyms
|
|
|
|
xorg.xcbutilrenderutil xorg.xcbutilwm libxkbcommon
|
2019-05-02 23:10:42 +01:00
|
|
|
xcbutilxrm ]
|
2021-01-15 13:21:58 +00:00
|
|
|
++ lib.optional gtk3Support gtk3;
|
2012-07-15 14:55:41 +01:00
|
|
|
|
2019-10-17 17:03:19 +01:00
|
|
|
cmakeFlags = [
|
|
|
|
#"-DGENERATE_MANPAGES=ON"
|
|
|
|
"-DOVERRIDE_VERSION=${version}"
|
2021-09-11 23:00:03 +01:00
|
|
|
] ++ lib.optional lua.pkgs.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"
|
2019-10-17 17:03:19 +01:00
|
|
|
;
|
2014-10-11 20:56:35 +01:00
|
|
|
|
2015-10-06 19:31:39 +01:00
|
|
|
GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
|
2019-04-27 15:49:43 +01:00
|
|
|
# LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags
|
|
|
|
# below for how awesome finds the libraries it needs at runtime.
|
2021-09-11 23:00:03 +01:00
|
|
|
LUA_CPATH = "${luaEnv}/lib/lua/${lua.luaversion}/?.so";
|
|
|
|
LUA_PATH = "${luaEnv}/share/lua/${lua.luaversion}/?.lua;;";
|
2013-11-13 02:34:49 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2019-05-02 23:10:42 +01:00
|
|
|
# Don't use wrapProgram or the wrapper will duplicate the --search
|
2019-05-02 22:27:52 +01:00
|
|
|
# arguments every restart
|
|
|
|
mv "$out/bin/awesome" "$out/bin/.awesome-wrapped"
|
|
|
|
makeWrapper "$out/bin/.awesome-wrapped" "$out/bin/awesome" \
|
2017-05-14 21:44:11 +01:00
|
|
|
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
|
2021-09-11 23:00:03 +01:00
|
|
|
--add-flags '--search ${luaEnv}/lib/lua/${lua.luaversion}' \
|
|
|
|
--add-flags '--search ${luaEnv}/share/lua/${lua.luaversion}' \
|
2019-04-27 15:49:43 +01:00
|
|
|
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
|
2013-11-13 02:34:49 +00:00
|
|
|
|
|
|
|
wrapProgram $out/bin/awesome-client \
|
|
|
|
--prefix PATH : "${which}/bin"
|
|
|
|
'';
|
2014-12-17 14:03:25 +00:00
|
|
|
|
|
|
|
passthru = {
|
|
|
|
inherit lua;
|
|
|
|
};
|
2017-02-17 00:22:38 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-02-17 00:22:38 +00:00
|
|
|
description = "Highly configurable, dynamic window manager for X";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://awesomewm.org/";
|
2017-02-17 00:22:38 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2019-12-26 21:28:10 +00:00
|
|
|
maintainers = with maintainers; [ lovek323 rasendubi ];
|
2017-02-17 00:22:38 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2013-11-13 02:34:49 +00:00
|
|
|
}
|