tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
awesome: use a luaEnv
Matthieu Coudron
4 years ago
03806dfe
823d0d83
+11
-11
1 changed file
expand all
collapse all
unified
split
pkgs
applications
window-managers
awesome
default.nix
+11
-11
pkgs/applications/window-managers/awesome/default.nix
···
1
1
-
{ lib, stdenv, fetchFromGitHub, luaPackages, cairo, librsvg, cmake, imagemagick, pkg-config, gdk-pixbuf
1
1
+
{ lib, stdenv, fetchFromGitHub, lua, cairo, librsvg, cmake, imagemagick, pkg-config, gdk-pixbuf
2
2
, xorg, libstartup_notification, libxdg_basedir, libpthreadstubs
3
3
, xcb-util-cursor, makeWrapper, pango, gobject-introspection
4
4
, which, dbus, nettools, git, doxygen
···
11
11
12
12
# needed for beautiful.gtk to work
13
13
assert gtk3Support -> gtk3 != null;
14
14
+
15
15
+
let
16
16
+
luaEnv = lua.withPackages(ps: [ ps.lgi ps.ldoc ]);
17
17
+
in
14
18
15
19
stdenv.mkDerivation rec {
16
16
-
lgi = luaPackages.lgi;
17
17
-
lua = luaPackages.lua;
18
18
-
ldoc = luaPackages.ldoc;
19
20
pname = "awesome";
20
21
version = "4.3";
21
22
···
35
36
xmlto docbook_xml_dtd_45
36
37
docbook_xsl findXMLCatalogs
37
38
asciidoctor
38
38
-
ldoc
39
39
];
40
40
41
41
outputs = [ "out" "doc" ];
···
44
44
45
45
propagatedUserEnvPkgs = [ hicolor-icon-theme ];
46
46
buildInputs = [ cairo librsvg dbus gdk-pixbuf gobject-introspection
47
47
-
git lgi libpthreadstubs libstartup_notification
47
47
+
git luaEnv libpthreadstubs libstartup_notification
48
48
libxdg_basedir lua nettools pango xcb-util-cursor
49
49
xorg.libXau xorg.libXdmcp xorg.libxcb xorg.libxshmfence
50
50
xorg.xcbutil xorg.xcbutilimage xorg.xcbutilkeysyms
···
55
55
cmakeFlags = [
56
56
#"-DGENERATE_MANPAGES=ON"
57
57
"-DOVERRIDE_VERSION=${version}"
58
58
-
] ++ lib.optional luaPackages.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"
58
58
+
] ++ lib.optional lua.pkgs.isLuaJIT "-DLUA_LIBRARY=${lua}/lib/libluajit-5.1.so"
59
59
;
60
60
61
61
GI_TYPELIB_PATH = "${pango.out}/lib/girepository-1.0";
62
62
# LUA_CPATH and LUA_PATH are used only for *building*, see the --search flags
63
63
# below for how awesome finds the libraries it needs at runtime.
64
64
-
LUA_CPATH = "${lgi}/lib/lua/${lua.luaversion}/?.so";
65
65
-
LUA_PATH = "${lgi}/share/lua/${lua.luaversion}/?.lua;;";
64
64
+
LUA_CPATH = "${luaEnv}/lib/lua/${lua.luaversion}/?.so";
65
65
+
LUA_PATH = "${luaEnv}/share/lua/${lua.luaversion}/?.lua;;";
66
66
67
67
postInstall = ''
68
68
# Don't use wrapProgram or the wrapper will duplicate the --search
···
70
70
mv "$out/bin/awesome" "$out/bin/.awesome-wrapped"
71
71
makeWrapper "$out/bin/.awesome-wrapped" "$out/bin/awesome" \
72
72
--set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
73
73
-
--add-flags '--search ${lgi}/lib/lua/${lua.luaversion}' \
74
74
-
--add-flags '--search ${lgi}/share/lua/${lua.luaversion}' \
73
73
+
--add-flags '--search ${luaEnv}/lib/lua/${lua.luaversion}' \
74
74
+
--add-flags '--search ${luaEnv}/share/lua/${lua.luaversion}' \
75
75
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH"
76
76
77
77
wrapProgram $out/bin/awesome-client \