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