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