2019-03-11 19:18:19 +03:00
|
|
|
{ stdenv, fetchFromGitHub, fetchpatch
|
|
|
|
, meson, ninja
|
|
|
|
, pkgconfig, scdoc
|
|
|
|
, wayland, libxkbcommon, pcre, json_c, dbus, libevdev
|
|
|
|
, pango, cairo, libinput, libcap, pam, gdk_pixbuf
|
|
|
|
, wlroots, wayland-protocols
|
2015-10-24 02:32:20 +03:00
|
|
|
}:
|
|
|
|
|
2017-10-17 04:47:59 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-11 19:18:19 +03:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "sway";
|
|
|
|
version = "1.0";
|
2016-07-17 10:31:41 +03:00
|
|
|
|
2017-09-26 18:24:13 +03:00
|
|
|
src = fetchFromGitHub {
|
2017-11-08 00:16:50 +03:00
|
|
|
owner = "swaywm";
|
2017-09-26 18:24:13 +03:00
|
|
|
repo = "sway";
|
2017-11-08 00:16:50 +03:00
|
|
|
rev = version;
|
2019-03-11 19:18:19 +03:00
|
|
|
sha256 = "09cndc2nl39d3l7g5634xp0pxcz60pvc5277mfw89r22mh0j78rx";
|
2017-09-26 18:24:13 +03:00
|
|
|
};
|
2016-07-17 10:31:41 +03:00
|
|
|
|
2019-03-11 19:18:19 +03:00
|
|
|
patches = [
|
|
|
|
# Fix for a compiler warning that causes a build failure
|
|
|
|
# (see https://github.com/swaywm/sway/issues/3862):
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/swaywm/sway/commit/bcde298a719f60b9913133dbd2a169dedbc8dd7d.patch";
|
|
|
|
sha256 = "0r583nmqvq43ib93yv6flw8pj833v32lbs0q0xld56s3rnzvvdcp";
|
|
|
|
})
|
2019-03-11 19:32:38 +03:00
|
|
|
./sway-config-no-nix-store-references.patch
|
2019-03-11 19:18:19 +03:00
|
|
|
];
|
|
|
|
|
2019-03-11 19:32:38 +03:00
|
|
|
nativeBuildInputs = [ pkgconfig meson ninja scdoc ];
|
2019-03-11 19:18:19 +03:00
|
|
|
|
2017-09-26 18:24:13 +03:00
|
|
|
buildInputs = [
|
2019-03-11 19:18:19 +03:00
|
|
|
wayland libxkbcommon pcre json_c dbus libevdev
|
|
|
|
pango cairo libinput libcap pam gdk_pixbuf
|
|
|
|
wlroots wayland-protocols
|
2017-09-26 18:24:13 +03:00
|
|
|
];
|
2016-07-17 10:31:41 +03:00
|
|
|
|
2017-10-24 18:43:19 +03:00
|
|
|
enableParallelBuilding = true;
|
2016-07-17 10:31:41 +03:00
|
|
|
|
2019-03-11 19:18:19 +03:00
|
|
|
mesonFlags = [
|
2019-03-11 19:32:38 +03:00
|
|
|
"-Ddefault-wallpaper=false" "-Dxwayland=enabled" "-Dgdk-pixbuf=enabled"
|
|
|
|
"-Dtray=enabled" "-Dman-pages=enabled"
|
|
|
|
];
|
2016-07-17 10:31:41 +03:00
|
|
|
|
2017-09-26 18:24:13 +03:00
|
|
|
meta = with stdenv.lib; {
|
2019-03-11 19:32:38 +03:00
|
|
|
description = "i3-compatible tiling Wayland compositor";
|
2018-10-23 21:34:59 +03:00
|
|
|
homepage = https://swaywm.org;
|
2017-09-26 18:24:13 +03:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2019-03-11 19:18:19 +03:00
|
|
|
maintainers = with maintainers; [ primeos synthetica ];
|
2017-09-26 18:24:13 +03:00
|
|
|
};
|
|
|
|
}
|