mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-30 02:42:59 +00:00
sway: make xwayland optional
This commit is contained in:
parent
ab63bfb36b
commit
7141eb9c57
@ -6,6 +6,8 @@
|
||||
, nixosTests
|
||||
# Used by the NixOS module:
|
||||
, isNixOS ? false
|
||||
|
||||
, enableXWayland ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -40,13 +42,16 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
wayland libxkbcommon pcre json_c dbus libevdev
|
||||
pango cairo libinput libcap pam gdk-pixbuf librsvg
|
||||
wlroots wayland-protocols libdrm
|
||||
wayland-protocols libdrm
|
||||
(wlroots.override { inherit enableXWayland; })
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddefault-wallpaper=false"
|
||||
"-Dsd-bus-provider=libsystemd"
|
||||
];
|
||||
]
|
||||
++ lib.optional (!enableXWayland) "-Dxwayland=disabled"
|
||||
;
|
||||
|
||||
passthru.tests.basic = nixosTests.sway;
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
, extraOptions ? [] # E.g.: [ "--verbose" ]
|
||||
# Used by the NixOS module:
|
||||
, isNixOS ? false
|
||||
|
||||
, enableXWayland ? true
|
||||
}:
|
||||
|
||||
assert extraSessionCommands != "" -> withBaseWrapper;
|
||||
@ -13,7 +15,7 @@ assert extraSessionCommands != "" -> withBaseWrapper;
|
||||
with lib;
|
||||
|
||||
let
|
||||
sway = sway-unwrapped.override { inherit isNixOS; };
|
||||
sway = sway-unwrapped.override { inherit isNixOS enableXWayland; };
|
||||
baseWrapper = writeShellScriptBin "sway" ''
|
||||
set -o errexit
|
||||
if [ ! "$_SWAY_WRAPPER_ALREADY_EXECUTED" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user