2019-03-11 16:18:19 +00: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 00:32:20 +01:00
|
|
|
}:
|
|
|
|
|
2017-10-17 02:47:59 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-03-11 16:18:19 +00:00
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "sway";
|
|
|
|
version = "1.0";
|
2016-07-17 08:31:41 +01:00
|
|
|
|
2017-09-26 16:24:13 +01:00
|
|
|
src = fetchFromGitHub {
|
2017-11-07 21:16:50 +00:00
|
|
|
owner = "swaywm";
|
2017-09-26 16:24:13 +01:00
|
|
|
repo = "sway";
|
2017-11-07 21:16:50 +00:00
|
|
|
rev = version;
|
2019-03-11 16:18:19 +00:00
|
|
|
sha256 = "09cndc2nl39d3l7g5634xp0pxcz60pvc5277mfw89r22mh0j78rx";
|
2017-09-26 16:24:13 +01:00
|
|
|
};
|
2016-07-17 08:31:41 +01:00
|
|
|
|
2019-03-11 16:18:19 +00: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 16:32:38 +00:00
|
|
|
./sway-config-no-nix-store-references.patch
|
2019-03-11 16:18:19 +00:00
|
|
|
];
|
|
|
|
|
2019-03-11 16:32:38 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig meson ninja scdoc ];
|
2019-03-11 16:18:19 +00:00
|
|
|
|
2017-09-26 16:24:13 +01:00
|
|
|
buildInputs = [
|
2019-03-11 16:18:19 +00:00
|
|
|
wayland libxkbcommon pcre json_c dbus libevdev
|
|
|
|
pango cairo libinput libcap pam gdk_pixbuf
|
|
|
|
wlroots wayland-protocols
|
2017-09-26 16:24:13 +01:00
|
|
|
];
|
2016-07-17 08:31:41 +01:00
|
|
|
|
2017-10-24 16:43:19 +01:00
|
|
|
enableParallelBuilding = true;
|
2016-07-17 08:31:41 +01:00
|
|
|
|
2019-03-11 16:18:19 +00:00
|
|
|
mesonFlags = [
|
2019-03-11 16:32:38 +00:00
|
|
|
"-Ddefault-wallpaper=false" "-Dxwayland=enabled" "-Dgdk-pixbuf=enabled"
|
|
|
|
"-Dtray=enabled" "-Dman-pages=enabled"
|
|
|
|
];
|
2016-07-17 08:31:41 +01:00
|
|
|
|
2017-09-26 16:24:13 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-03-11 16:32:38 +00:00
|
|
|
description = "i3-compatible tiling Wayland compositor";
|
2018-10-23 19:34:59 +01:00
|
|
|
homepage = https://swaywm.org;
|
2017-09-26 16:24:13 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
2019-03-11 16:18:19 +00:00
|
|
|
maintainers = with maintainers; [ primeos synthetica ];
|
2017-09-26 16:24:13 +01:00
|
|
|
};
|
|
|
|
}
|