git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #125161 from AndersonTorres/new-wio

wio: unstable-2020-11-02 -> 0.0.0+unstable=2021-06-01

commit98d5ae7dcc6d01e071b83fc57014c948b8b24e8f authorAnderson Torres <torres.anderson.85@protonmail.com> dateWed 2 Jun 2021, 00:51 (5 years ago) parentbc09b890dcb2da
2 files changed+17−268
pkgs/applications/window-managers/wio/default.nix+17−14 pkgs/applications/window-managers/wio/wlroots-0.13.patch−254
pkgs/applications/window-managers/wio/default.nix+17−14
@@ -1,4 +1,6 @@
1−{ lib, stdenv, fetchgit
1+{ lib
2+, stdenv
3+, fetchFromBitbucket
24, meson
35, ninja
46, pkg-config
@@ -17,28 +19,29 @@
1719
1820stdenv.mkDerivation rec {
1921 pname = "wio";
20− version = "unstable-2020-11-02";
22+ version = "0.0.0+unstable=2021-06-01";
2123
22− src = fetchgit {
23− url = "https://git.sr.ht/~sircmpwn/wio";
24− rev = "31b742e473b15a2087be740d1de28bc2afd47a4d";
25− sha256 = "1vpvlahv6dmr7vfb11p5cc5ds2y2vfvcb877nkqx18yin6pg357l";
24+ src = fetchFromBitbucket {
25+ owner = "anderson_torres";
26+ repo = pname;
27+ rev = "ad57eb45ba0459cd0b16ba486cb6e01626079c29";
28+ sha256 = "sha256-mCggAscQ+Ej3SNwhA6QxecV1nH6Rw8RDf8yAsbadqjE=";
2629 };
2730
28− patches = [
29− # To fix the build with wlroots 0.13:
30− ./wlroots-0.13.patch
31+ nativeBuildInputs = [
32+ meson
33+ ninja
34+ pkg-config
35+ makeWrapper
3136 ];
32−
33− nativeBuildInputs = [ meson ninja pkg-config makeWrapper ];
3437 buildInputs = [
3538 cairo
3639 libxkbcommon
40+ mesa # for libEGL
3741 udev
3842 wayland
3943 wayland-protocols
4044 wlroots
41− mesa # for libEGL
4245 xwayland
4346 ];
4447
@@ -48,15 +51,15 @@ stdenv.mkDerivation rec {
4851 '';
4952
5053 meta = with lib; {
54+ homepage = "https://wio-project.org/";
5155 description = "That Plan 9 feel, for Wayland";
5256 longDescription = ''
5357 Wio is a Wayland compositor for Linux and FreeBSD which has a similar look
5458 and feel to plan9's rio.
5559 '';
56− homepage = "https://wio-project.org/";
5760 license = licenses.mit;
58− platforms = with platforms; linux;
5961 maintainers = with maintainers; [ AndersonTorres ];
62+ platforms = with platforms; linux;
6063 };
6164
6265 passthru.providedSessions = [ "wio" ];
pkgs/applications/window-managers/wio/wlroots-0.13.patchdeleted−254
@@ -1,254 +0,0 @@
1−commit 8a3f903b20d646ebb2472c4f094ca1bf225a96c7
2−Author: Michael Weiss <dev.primeos@gmail.com>
3−Date: Fri May 14 19:19:05 2021 +0200
4−
5− Fix the build with wlroots 0.13
6−
7−diff --git a/main.c b/main.c
8−index 5d7dcda..870fdb0 100644
9−--- a/main.c
10−+++ b/main.c
11−@@ -1,6 +1,7 @@
12− #define _POSIX_C_SOURCE 200809L
13− #include <assert.h>
14− #include <cairo/cairo.h>
15−+#include <libdrm/drm_fourcc.h>
16− #include <getopt.h>
17− #include <stdlib.h>
18− #include <string.h>
19−@@ -49,7 +50,7 @@ static void gen_menu_textures(struct wio_server *server) {
20− cairo_surface_flush(surf);
21− unsigned char *data = cairo_image_surface_get_data(surf);
22− server->menu.inactive_textures[i] = wlr_texture_from_pixels(renderer,
23−- WL_SHM_FORMAT_ARGB8888,
24−+ DRM_FORMAT_ARGB8888,
25− cairo_image_surface_get_stride(surf),
26− extents.width + 2, extents.height + 2, data);
27− }
28−@@ -66,7 +67,7 @@ static void gen_menu_textures(struct wio_server *server) {
29− cairo_surface_flush(surf);
30− unsigned char *data = cairo_image_surface_get_data(surf);
31− server->menu.active_textures[i] = wlr_texture_from_pixels(renderer,
32−- WL_SHM_FORMAT_ARGB8888,
33−+ DRM_FORMAT_ARGB8888,
34− cairo_image_surface_get_stride(surf),
35− extents.width + 2, extents.height + 2, data);
36− }
37−@@ -152,7 +153,7 @@ int main(int argc, char **argv) {
38− }
39−
40− server.wl_display = wl_display_create();
41−- server.backend = wlr_backend_autocreate(server.wl_display, NULL);
42−+ server.backend = wlr_backend_autocreate(server.wl_display);
43− server.renderer = wlr_backend_get_renderer(server.backend);
44− wlr_renderer_init_wl_display(server.renderer, server.wl_display);
45−
46−diff --git a/protocols/wlr-layer-shell-unstable-v1.xml b/protocols/wlr-layer-shell-unstable-v1.xml
47−index 90b8bc8..d62fd51 100644
48−--- a/protocols/wlr-layer-shell-unstable-v1.xml
49−+++ b/protocols/wlr-layer-shell-unstable-v1.xml
50−@@ -25,7 +25,7 @@
51− THIS SOFTWARE.
52− </copyright>
53−
54−- <interface name="zwlr_layer_shell_v1" version="1">
55−+ <interface name="zwlr_layer_shell_v1" version="4">
56− <description summary="create surfaces that are layers of the desktop">
57− Clients can use this interface to assign the surface_layer role to
58− wl_surfaces. Such surfaces are assigned to a "layer" of the output and
59−@@ -47,6 +47,12 @@
60− or manipulate a buffer prior to the first layer_surface.configure call
61− must also be treated as errors.
62−
63−+ After creating a layer_surface object and setting it up, the client
64−+ must perform an initial commit without any buffer attached.
65−+ The compositor will reply with a layer_surface.configure event.
66−+ The client must acknowledge it and is then allowed to attach a buffer
67−+ to map the surface.
68−+
69− You may pass NULL for output to allow the compositor to decide which
70− output to use. Generally this will be the one that the user most
71− recently interacted with.
72−@@ -82,17 +88,35 @@
73− <entry name="top" value="2"/>
74− <entry name="overlay" value="3"/>
75− </enum>
76−+
77−+ <!-- Version 3 additions -->
78−+
79−+ <request name="destroy" type="destructor" since="3">
80−+ <description summary="destroy the layer_shell object">
81−+ This request indicates that the client will not use the layer_shell
82−+ object any more. Objects that have been created through this instance
83−+ are not affected.
84−+ </description>
85−+ </request>
86− </interface>
87−
88−- <interface name="zwlr_layer_surface_v1" version="1">
89−+ <interface name="zwlr_layer_surface_v1" version="4">
90− <description summary="layer metadata interface">
91− An interface that may be implemented by a wl_surface, for surfaces that
92− are designed to be rendered as a layer of a stacked desktop-like
93− environment.
94−
95−- Layer surface state (size, anchor, exclusive zone, margin, interactivity)
96−- is double-buffered, and will be applied at the time wl_surface.commit of
97−- the corresponding wl_surface is called.
98−+ Layer surface state (layer, size, anchor, exclusive zone,
99−+ margin, interactivity) is double-buffered, and will be applied at the
100−+ time wl_surface.commit of the corresponding wl_surface is called.
101−+
102−+ Attaching a null buffer to a layer surface unmaps it.
103−+
104−+ Unmapping a layer_surface means that the surface cannot be shown by the
105−+ compositor until it is explicitly mapped again. The layer_surface
106−+ returns to the state it had right after layer_shell.get_layer_surface.
107−+ The client can re-map the surface by performing a commit without any
108−+ buffer attached, waiting for a configure event and handling it as usual.
109− </description>
110−
111− <request name="set_size">
112−@@ -127,14 +151,19 @@
113−
114− <request name="set_exclusive_zone">
115− <description summary="configures the exclusive geometry of this surface">
116−- Requests that the compositor avoids occluding an area of the surface
117−- with other surfaces. The compositor's use of this information is
118−+ Requests that the compositor avoids occluding an area with other
119−+ surfaces. The compositor's use of this information is
120− implementation-dependent - do not assume that this region will not
121− actually be occluded.
122−
123−- A positive value is only meaningful if the surface is anchored to an
124−- edge, rather than a corner. The zone is the number of surface-local
125−- coordinates from the edge that is considered exclusive.
126−+ A positive value is only meaningful if the surface is anchored to one
127−+ edge or an edge and both perpendicular edges. If the surface is not
128−+ anchored, anchored to only two perpendicular edges (a corner), anchored
129−+ to only two parallel edges or anchored to all edges, a positive value
130−+ will be treated the same as zero.
131−+
132−+ A positive zone is the distance from the edge in surface-local
133−+ coordinates to consider exclusive.
134−
135− Surfaces that do not wish to have an exclusive zone may instead specify
136− how they should interact with surfaces that do. If set to zero, the
137−@@ -174,21 +203,85 @@
138− <arg name="left" type="int"/>
139− </request>
140−
141−+ <enum name="keyboard_interactivity">
142−+ <description summary="types of keyboard interaction possible for a layer shell surface">
143−+ Types of keyboard interaction possible for layer shell surfaces. The
144−+ rationale for this is twofold: (1) some applications are not interested
145−+ in keyboard events and not allowing them to be focused can improve the
146−+ desktop experience; (2) some applications will want to take exclusive
147−+ keyboard focus.
148−+ </description>
149−+
150−+ <entry name="none" value="0">
151−+ <description summary="no keyboard focus is possible">
152−+ This value indicates that this surface is not interested in keyboard
153−+ events and the compositor should never assign it the keyboard focus.
154−+
155−+ This is the default value, set for newly created layer shell surfaces.
156−+
157−+ This is useful for e.g. desktop widgets that display information or
158−+ only have interaction with non-keyboard input devices.
159−+ </description>
160−+ </entry>
161−+ <entry name="exclusive" value="1">
162−+ <description summary="request exclusive keyboard focus">
163−+ Request exclusive keyboard focus if this surface is above the shell surface layer.
164−+
165−+ For the top and overlay layers, the seat will always give
166−+ exclusive keyboard focus to the top-most layer which has keyboard
167−+ interactivity set to exclusive. If this layer contains multiple
168−+ surfaces with keyboard interactivity set to exclusive, the compositor
169−+ determines the one receiving keyboard events in an implementation-
170−+ defined manner. In this case, no guarantee is made when this surface
171−+ will receive keyboard focus (if ever).
172−+
173−+ For the bottom and background layers, the compositor is allowed to use
174−+ normal focus semantics.
175−+
176−+ This setting is mainly intended for applications that need to ensure
177−+ they receive all keyboard events, such as a lock screen or a password
178−+ prompt.
179−+ </description>
180−+ </entry>
181−+ <entry name="on_demand" value="2" since="4">
182−+ <description summary="request regular keyboard focus semantics">
183−+ This requests the compositor to allow this surface to be focused and
184−+ unfocused by the user in an implementation-defined manner. The user
185−+ should be able to unfocus this surface even regardless of the layer
186−+ it is on.
187−+
188−+ Typically, the compositor will want to use its normal mechanism to
189−+ manage keyboard focus between layer shell surfaces with this setting
190−+ and regular toplevels on the desktop layer (e.g. click to focus).
191−+ Nevertheless, it is possible for a compositor to require a special
192−+ interaction to focus or unfocus layer shell surfaces (e.g. requiring
193−+ a click even if focus follows the mouse normally, or providing a
194−+ keybinding to switch focus between layers).
195−+
196−+ This setting is mainly intended for desktop shell components (e.g.
197−+ panels) that allow keyboard interaction. Using this option can allow
198−+ implementing a desktop shell that can be fully usable without the
199−+ mouse.
200−+ </description>
201−+ </entry>
202−+ </enum>
203−+
204− <request name="set_keyboard_interactivity">
205− <description summary="requests keyboard events">
206−- Set to 1 to request that the seat send keyboard events to this layer
207−- surface. For layers below the shell surface layer, the seat will use
208−- normal focus semantics. For layers above the shell surface layers, the
209−- seat will always give exclusive keyboard focus to the top-most layer
210−- which has keyboard interactivity set to true.
211−+ Set how keyboard events are delivered to this surface. By default,
212−+ layer shell surfaces do not receive keyboard events; this request can
213−+ be used to change this.
214−+
215−+ This setting is inherited by child surfaces set by the get_popup
216−+ request.
217−
218− Layer surfaces receive pointer, touch, and tablet events normally. If
219− you do not want to receive them, set the input region on your surface
220− to an empty region.
221−
222−- Events is double-buffered, see wl_surface.commit.
223−+ Keyboard interactivity is double-buffered, see wl_surface.commit.
224− </description>
225−- <arg name="keyboard_interactivity" type="uint"/>
226−+ <arg name="keyboard_interactivity" type="uint" enum="keyboard_interactivity"/>
227− </request>
228−
229− <request name="get_popup">
230−@@ -273,6 +366,7 @@
231− <entry name="invalid_surface_state" value="0" summary="provided surface state is invalid"/>
232− <entry name="invalid_size" value="1" summary="size is invalid"/>
233− <entry name="invalid_anchor" value="2" summary="anchor bitfield is invalid"/>
234−+ <entry name="invalid_keyboard_interactivity" value="3" summary="keyboard interactivity is invalid"/>
235− </enum>
236−
237− <enum name="anchor" bitfield="true">
238−@@ -281,5 +375,16 @@
239− <entry name="left" value="4" summary="the left edge of the anchor rectangle"/>
240− <entry name="right" value="8" summary="the right edge of the anchor rectangle"/>
241− </enum>
242−+
243−+ <!-- Version 2 additions -->
244−+
245−+ <request name="set_layer" since="2">
246−+ <description summary="change the layer of the surface">
247−+ Change the layer that the surface is rendered on.
248−+
249−+ Layer is double-buffered, see wl_surface.commit.
250−+ </description>
251−+ <arg name="layer" type="uint" enum="zwlr_layer_shell_v1.layer" summary="layer to move this surface to"/>
252−+ </request>
253− </interface>
254− </protocol>