lol
1{ fetchurl, stdenv, which, pkgconfig, makeWrapper, libxcb, xcbutilkeysyms
2, xcbutil, xcbutilwm, libstartup_notification, libX11, pcre, libev, yajl
3, xcb-util-cursor, coreutils, perl, pango, perlPackages, libxkbcommon
4, xorgserver, xvfb_run }:
5
6stdenv.mkDerivation rec {
7 name = "i3-${version}";
8 version = "4.10.2";
9
10 src = fetchurl {
11 url = "http://i3wm.org/downloads/${name}.tar.bz2";
12 sha256 = "1n6grkpv5rsn9zgg8if76mmg85w1asbm3rpplxyn6fzr8wds7587";
13 };
14
15 buildInputs = [
16 which pkgconfig makeWrapper libxcb xcbutilkeysyms xcbutil xcbutilwm libxkbcommon
17 libstartup_notification libX11 pcre libev yajl xcb-util-cursor perl pango
18 perlPackages.AnyEventI3 perlPackages.X11XCB perlPackages.IPCRun
19 perlPackages.ExtUtilsPkgConfig perlPackages.TestMore perlPackages.InlineC
20 xorgserver xvfb_run
21 ];
22
23 postPatch = ''
24 patchShebangs .
25 '';
26
27 # Tests have been failing (at least for some people in some cases)
28 # and have been disabled until someone wants to fix them. Some
29 # initial digging uncovers that the tests call out to `git`, which
30 # they shouldn't, and then even once that's fixed have some
31 # perl-related errors later on. For more, see
32 # https://github.com/NixOS/nixpkgs/issues/7957
33 doCheck = false; # stdenv.system == "x86_64-linux";
34
35 checkPhase = stdenv.lib.optionalString (stdenv.system == "x86_64-linux")
36 ''
37 (cd testcases && xvfb-run ./complete-run.pl -p 1 --keep-xserver-output)
38 ! grep -q '^not ok' testcases/latest/complete-run.log
39 '';
40
41 configurePhase = "makeFlags=PREFIX=$out";
42
43 postInstall = ''
44 wrapProgram "$out/bin/i3-save-tree" --prefix PERL5LIB ":" "$PERL5LIB"
45 mkdir -p $out/man/man1
46 cp man/*.1 $out/man/man1
47 for program in $out/bin/i3-sensible-*; do
48 sed -i 's/which/command -v/' $program
49 done
50 '';
51
52 meta = with stdenv.lib; {
53 description = "A tiling window manager";
54 homepage = "http://i3wm.org";
55 maintainers = with maintainers; [ garbas modulistic ];
56 license = licenses.bsd3;
57 platforms = platforms.all;
58
59 longDescription = ''
60 A tiling window manager primarily targeted at advanced users and
61 developers. Based on a tree as data structure, supports tiling,
62 stacking, and tabbing layouts, handled dynamically, as well as
63 floating windows. Configured via plain text file. Multi-monitor.
64 UTF-8 clean.
65 '';
66 };
67
68}