2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, substituteAll, swaybg
|
2020-07-18 16:06:22 +00:00
|
|
|
, meson, ninja, pkg-config, wayland, scdoc
|
|
|
|
, libxkbcommon, pcre, json_c, dbus, libevdev
|
2020-05-15 21:57:56 +00:00
|
|
|
, pango, cairo, libinput, libcap, pam, gdk-pixbuf, librsvg
|
2021-04-08 16:26:57 +00:00
|
|
|
, wlroots, wayland-protocols, libdrm
|
2021-05-20 23:08:51 +00:00
|
|
|
, nixosTests
|
|
|
|
# Used by the NixOS module:
|
|
|
|
, isNixOS ? false
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sway-unwrapped";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.6.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "swaywm";
|
|
|
|
repo = "sway";
|
|
|
|
rev = version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0j4sdbsrlvky1agacc0pcz9bwmaxjmrapjnzscbd2i0cria2fc5j";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./sway-config-no-nix-store-references.patch
|
|
|
|
./load-configuration-from-etc.patch
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
inherit swaybg;
|
|
|
|
})
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
postPatch = lib.optionalString isNixOS ''
|
|
|
|
echo -e '\ninclude /etc/sway/config.d/*' >> config.in
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2020-07-18 16:06:22 +00:00
|
|
|
meson ninja pkg-config wayland scdoc
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
wayland libxkbcommon pcre json_c dbus libevdev
|
2020-05-15 21:57:56 +00:00
|
|
|
pango cairo libinput libcap pam gdk-pixbuf librsvg
|
2021-04-08 16:26:57 +00:00
|
|
|
wlroots wayland-protocols libdrm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
2020-07-18 16:06:22 +00:00
|
|
|
"-Ddefault-wallpaper=false"
|
2021-04-08 16:26:57 +00:00
|
|
|
"-Dsd-bus-provider=libsystemd"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
passthru.tests.basic = nixosTests.sway;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-07-18 16:06:22 +00:00
|
|
|
description = "An i3-compatible tiling Wayland compositor";
|
|
|
|
longDescription = ''
|
|
|
|
Sway is a tiling Wayland compositor and a drop-in replacement for the i3
|
|
|
|
window manager for X11. It works with your existing i3 configuration and
|
|
|
|
supports most of i3's features, plus a few extras.
|
|
|
|
Sway allows you to arrange your application windows logically, rather
|
|
|
|
than spatially. Windows are arranged into a grid by default which
|
|
|
|
maximizes the efficiency of your screen and can be quickly manipulated
|
|
|
|
using only the keyboard.
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://swaywm.org";
|
2020-07-18 16:06:22 +00:00
|
|
|
changelog = "https://github.com/swaywm/sway/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos synthetica ma27 ];
|
|
|
|
};
|
|
|
|
}
|