1 { fetchurl, lib, stdenv, pkg-config, makeWrapper, meson, ninja, installShellFiles, libxcb, xcbutilkeysyms
2 , xcbutil, xcbutilwm, xcbutilxrm, libstartup_notification, libX11, pcre2, libev
3 , yajl, xcb-util-cursor, perl, pango, perlPackages, libxkbcommon
4 , xorgserver, xvfb-run, xdotool, xorg, which
5 , asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl, findXMLCatalogs
9 stdenv.mkDerivation rec {
14 url = "https://i3wm.org/downloads/${pname}-${version}.tar.xz";
15 sha256 = "sha256-YQJqcZbJE50POq3ScZfosyDFduOkUOAddMGspIQETEY=";
19 pkg-config makeWrapper meson ninja installShellFiles perl
20 asciidoc xmlto docbook_xml_dtd_45 docbook_xsl findXMLCatalogs
29 libxcb xcbutilkeysyms xcbutil xcbutilwm xcbutilxrm libxkbcommon
30 libstartup_notification libX11 pcre2 libev yajl xcb-util-cursor perl pango
31 perlPackages.AnyEventI3 perlPackages.X11XCB perlPackages.IPCRun
32 perlPackages.ExtUtilsPkgConfig perlPackages.InlineC
33 ] ++ lib.optionals doCheck [
34 xorgserver xvfb-run xdotool xorg.setxkbmap xorg.xrandr which
37 configureFlags = [ "--disable-builddir" ];
42 # This testcase generates a Perl executable file with a shebang, and
43 # patchShebangs can't replace a shebang in the middle of a file.
44 if [ -f testcases/t/318-i3-dmenu-desktop.t ]; then
45 substituteInPlace testcases/t/318-i3-dmenu-desktop.t \
46 --replace-fail "#!/usr/bin/env perl" "#!${perl}/bin/perl"
50 # xvfb-run is available only on Linux
51 doCheck = stdenv.hostPlatform.isLinux;
55 # "| cat" disables fancy progress reporting which makes the log unreadable.
56 ./complete-run.pl -p 1 --keep-xserver-output | cat || test_failed="complete-run.pl returned $?"
57 if [ -z "$test_failed" ]; then
58 # Apparently some old versions of `complete-run.pl` did not return a
59 # proper exit code, so check the log for signs of errors too.
60 grep -q '^not ok' latest/complete-run.log && test_failed="test log contains errors" ||:
62 if [ -n "$test_failed" ]; then
63 echo "***** Error: $test_failed"
64 echo "===== Test log ====="
65 cat latest/complete-run.log
66 echo "===== End of test log ====="
72 wrapProgram "$out/bin/i3-save-tree" --prefix PERL5LIB ":" "$PERL5LIB"
73 for program in $out/bin/i3-sensible-*; do
74 sed -i 's/which/command -v/' $program
77 installManPage man/*.1
80 separateDebugInfo = true;
82 passthru.tests = { inherit (nixosTests) i3wm; };
86 description = "Tiling window manager";
87 homepage = "https://i3wm.org";
88 maintainers = with maintainers; [ modulistic fpletz ];
90 license = licenses.bsd3;
91 platforms = platforms.all;
94 A tiling window manager primarily targeted at advanced users and
95 developers. Based on a tree as data structure, supports tiling,
96 stacking, and tabbing layouts, handled dynamically, as well as
97 floating windows. Configured via plain text file. Multi-monitor.