tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
sway: make xwayland optional
Yureka
4 years ago
7141eb9c
ab63bfb3
+10
-3
2 changed files
expand all
collapse all
unified
split
pkgs
applications
window-managers
sway
default.nix
wrapper.nix
+7
-2
pkgs/applications/window-managers/sway/default.nix
···
6
, nixosTests
7
# Used by the NixOS module:
8
, isNixOS ? false
0
0
9
}:
10
11
stdenv.mkDerivation rec {
···
40
buildInputs = [
41
wayland libxkbcommon pcre json_c dbus libevdev
42
pango cairo libinput libcap pam gdk-pixbuf librsvg
43
-
wlroots wayland-protocols libdrm
0
44
];
45
46
mesonFlags = [
47
"-Ddefault-wallpaper=false"
48
"-Dsd-bus-provider=libsystemd"
49
-
];
0
0
50
51
passthru.tests.basic = nixosTests.sway;
52
···
6
, nixosTests
7
# Used by the NixOS module:
8
, isNixOS ? false
9
+
10
+
, enableXWayland ? true
11
}:
12
13
stdenv.mkDerivation rec {
···
42
buildInputs = [
43
wayland libxkbcommon pcre json_c dbus libevdev
44
pango cairo libinput libcap pam gdk-pixbuf librsvg
45
+
wayland-protocols libdrm
46
+
(wlroots.override { inherit enableXWayland; })
47
];
48
49
mesonFlags = [
50
"-Ddefault-wallpaper=false"
51
"-Dsd-bus-provider=libsystemd"
52
+
]
53
+
++ lib.optional (!enableXWayland) "-Dxwayland=disabled"
54
+
;
55
56
passthru.tests.basic = nixosTests.sway;
57
+3
-1
pkgs/applications/window-managers/sway/wrapper.nix
···
6
, extraOptions ? [] # E.g.: [ "--verbose" ]
7
# Used by the NixOS module:
8
, isNixOS ? false
0
0
9
}:
10
11
assert extraSessionCommands != "" -> withBaseWrapper;
···
13
with lib;
14
15
let
16
-
sway = sway-unwrapped.override { inherit isNixOS; };
17
baseWrapper = writeShellScriptBin "sway" ''
18
set -o errexit
19
if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then
···
6
, extraOptions ? [] # E.g.: [ "--verbose" ]
7
# Used by the NixOS module:
8
, isNixOS ? false
9
+
10
+
, enableXWayland ? true
11
}:
12
13
assert extraSessionCommands != "" -> withBaseWrapper;
···
15
with lib;
16
17
let
18
+
sway = sway-unwrapped.override { inherit isNixOS enableXWayland; };
19
baseWrapper = writeShellScriptBin "sway" ''
20
set -o errexit
21
if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then