nixpkgs/pkgs/applications/window-managers/sway/default.nix
2019-08-27 11:32:15 +02:00

52 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, makeWrapper
, meson, ninja
, pkgconfig, scdoc
, wayland, libxkbcommon, pcre, json_c, dbus, libevdev
, pango, cairo, libinput, libcap, pam, gdk-pixbuf
, wlroots, wayland-protocols, swaybg
}:
stdenv.mkDerivation rec {
pname = "sway";
version = "1.2";
src = fetchFromGitHub {
owner = "swaywm";
repo = "sway";
rev = version;
sha256 = "0vch2zm5afc76ia78p3vg71zr2fyda67l9hd2h0x1jq3mnvfbxnd";
};
patches = [
./sway-config-no-nix-store-references.patch
./load-configuration-from-etc.patch
];
nativeBuildInputs = [ pkgconfig meson ninja scdoc makeWrapper ];
buildInputs = [
wayland libxkbcommon pcre json_c dbus libevdev
pango cairo libinput libcap pam gdk-pixbuf
wlroots wayland-protocols
];
enableParallelBuilding = true;
mesonFlags = [
"-Ddefault-wallpaper=false" "-Dxwayland=enabled" "-Dgdk-pixbuf=enabled"
"-Dtray=enabled" "-Dman-pages=enabled"
];
postInstall = ''
wrapProgram $out/bin/sway --prefix PATH : "${swaybg}/bin"
'';
meta = with stdenv.lib; {
description = "i3-compatible tiling Wayland compositor";
homepage = https://swaywm.org;
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ primeos synthetica ];
};
}