|
14 | 14 | , pulseaudio |
15 | 15 | }: |
16 | 16 |
|
17 | | -let |
18 | | - unwrapped = python3Packages.buildPythonPackage rec { |
19 | | - pname = "qtile"; |
20 | | - version = "0.22.1"; |
| 17 | +python3Packages.buildPythonPackage rec { |
| 18 | + pname = "qtile"; |
| 19 | + version = "0.22.1"; |
21 | 20 |
|
22 | | - src = fetchFromGitHub { |
23 | | - owner = "qtile"; |
24 | | - repo = "qtile"; |
25 | | - rev = "v${version}"; |
26 | | - hash = "sha256-HOyExVKOqZ4OeNM1/AiXQeiUV+EbSJLEjWEibm07ff8="; |
27 | | - }; |
| 21 | + src = fetchFromGitHub { |
| 22 | + owner = "qtile"; |
| 23 | + repo = "qtile"; |
| 24 | + rev = "v${version}"; |
| 25 | + hash = "sha256-HOyExVKOqZ4OeNM1/AiXQeiUV+EbSJLEjWEibm07ff8="; |
| 26 | + }; |
28 | 27 |
|
29 | | - patches = [ |
30 | | - ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 |
31 | | - ]; |
| 28 | + patches = [ |
| 29 | + ./fix-restart.patch # https://github.com/NixOS/nixpkgs/issues/139568 |
| 30 | + ]; |
32 | 31 |
|
33 | | - postPatch = '' |
34 | | - substituteInPlace libqtile/pangocffi.py \ |
35 | | - --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ |
36 | | - --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \ |
37 | | - --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 |
38 | | - substituteInPlace libqtile/backend/x11/xcursors.py \ |
39 | | - --replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0 |
40 | | - ''; |
| 32 | + postPatch = '' |
| 33 | + substituteInPlace libqtile/pangocffi.py \ |
| 34 | + --replace libgobject-2.0.so.0 ${glib.out}/lib/libgobject-2.0.so.0 \ |
| 35 | + --replace libpangocairo-1.0.so.0 ${pango.out}/lib/libpangocairo-1.0.so.0 \ |
| 36 | + --replace libpango-1.0.so.0 ${pango.out}/lib/libpango-1.0.so.0 |
| 37 | + substituteInPlace libqtile/backend/x11/xcursors.py \ |
| 38 | + --replace libxcb-cursor.so.0 ${xcbutilcursor.out}/lib/libxcb-cursor.so.0 |
| 39 | + ''; |
41 | 40 |
|
42 | | - SETUPTOOLS_SCM_PRETEND_VERSION = version; |
| 41 | + SETUPTOOLS_SCM_PRETEND_VERSION = version; |
43 | 42 |
|
44 | | - nativeBuildInputs = [ |
45 | | - pkg-config |
46 | | - ] ++ (with python3Packages; [ |
47 | | - setuptools-scm |
48 | | - ]); |
| 43 | + nativeBuildInputs = [ |
| 44 | + pkg-config |
| 45 | + ] ++ (with python3Packages; [ |
| 46 | + setuptools-scm |
| 47 | + ]); |
49 | 48 |
|
50 | | - propagatedBuildInputs = with python3Packages; [ |
51 | | - xcffib |
52 | | - (cairocffi.override { withXcffib = true; }) |
53 | | - setuptools |
54 | | - python-dateutil |
55 | | - dbus-python |
56 | | - dbus-next |
57 | | - mpd2 |
58 | | - psutil |
59 | | - pyxdg |
60 | | - pygobject3 |
61 | | - pywayland |
62 | | - pywlroots |
63 | | - xkbcommon |
64 | | - pulseaudio |
65 | | - ]; |
| 49 | + propagatedBuildInputs = with python3Packages; [ |
| 50 | + xcffib |
| 51 | + (cairocffi.override { withXcffib = true; }) |
| 52 | + setuptools |
| 53 | + python-dateutil |
| 54 | + dbus-python |
| 55 | + dbus-next |
| 56 | + mpd2 |
| 57 | + psutil |
| 58 | + pyxdg |
| 59 | + pygobject3 |
| 60 | + pywayland |
| 61 | + pywlroots |
| 62 | + xkbcommon |
| 63 | + pulseaudio |
| 64 | + ]; |
66 | 65 |
|
67 | | - buildInputs = [ |
68 | | - libinput |
69 | | - wayland |
70 | | - wlroots |
71 | | - libxkbcommon |
72 | | - ]; |
| 66 | + buildInputs = [ |
| 67 | + libinput |
| 68 | + wayland |
| 69 | + wlroots |
| 70 | + libxkbcommon |
| 71 | + ]; |
73 | 72 |
|
74 | | - # for `qtile check`, needs `stubtest` and `mypy` commands |
75 | | - makeWrapperArgs = [ |
76 | | - "--suffix PATH : ${lib.makeBinPath [ mypy ]}" |
77 | | - ]; |
| 73 | + # for `qtile check`, needs `stubtest` and `mypy` commands |
| 74 | + makeWrapperArgs = [ |
| 75 | + "--suffix PATH : ${lib.makeBinPath [ mypy ]}" |
| 76 | + ]; |
78 | 77 |
|
79 | | - doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure. |
| 78 | + doCheck = false; # Requires X server #TODO this can be worked out with the existing NixOS testing infrastructure. |
80 | 79 |
|
81 | | - meta = with lib; { |
82 | | - homepage = "http://www.qtile.org/"; |
83 | | - license = licenses.mit; |
84 | | - description = "A small, flexible, scriptable tiling window manager written in Python"; |
85 | | - platforms = platforms.linux; |
86 | | - maintainers = with maintainers; [ kamilchm arjan-s ]; |
87 | | - }; |
| 80 | + meta = with lib; { |
| 81 | + homepage = "http://www.qtile.org/"; |
| 82 | + license = licenses.mit; |
| 83 | + description = "A small, flexible, scriptable tiling window manager written in Python"; |
| 84 | + platforms = platforms.linux; |
| 85 | + maintainers = with maintainers; [ kamilchm arjan-s ]; |
88 | 86 | }; |
89 | | -in |
90 | | -(python3.withPackages (_: [ unwrapped ])).overrideAttrs (_: { |
91 | | - # otherwise will be exported as "env", this restores `nix search` behavior |
92 | | - name = "${unwrapped.pname}-${unwrapped.version}"; |
93 | | - # export underlying qtile package |
94 | | - passthru = { inherit unwrapped; }; |
95 | | - |
96 | | - # restore original qtile attrs |
97 | | - inherit (unwrapped) pname version meta; |
98 | | -}) |
| 87 | +} |
0 commit comments