2019-05-22 12:03:39 +01:00
|
|
|
{ stdenv, fetchFromGitHub, luaPackages, cairo, librsvg, cmake, imagemagick, pkgconfig, 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;
|
|
|
|
|
2019-10-17 17:03:19 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
lgi = luaPackages.lgi;
|
|
|
|
lua = luaPackages.lua;
|
|
|
|
ldoc = luaPackages.ldoc;
|
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
|
|
|
};
|
|
|
|
|
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
|
|
|
|
pkgconfig
|
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
|
2019-04-27 19:54:07 +01:00
|
|
|
ldoc
|
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
|
2017-02-17 00:22:38 +00:00
|
|
|
git lgi libpthreadstubs libstartup_notification
|
|
|
|
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 ]
|
|
|
|
++ stdenv.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}"
|
|
|
|
] ++ stdenv.lib.optional luaPackages.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"
|
|
|
|
;
|
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.
|
2014-12-17 14:03:25 +00:00
|
|
|
LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so";
|
2019-04-27 15:49:43 +01:00
|
|
|
LUA_PATH = "${lgi}/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" \
|
2018-01-02 17:24:56 +00:00
|
|
|
--add-flags '--search ${lgi}/lib/lua/${lua.luaversion}' \
|
|
|
|
--add-flags '--search ${lgi}/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
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
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
|
|
|
}
|