2017-09-26 15:24:13 +00:00
|
|
|
{ stdenv, fetchFromGitHub
|
|
|
|
, makeWrapper, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl
|
|
|
|
, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, dbus_libs
|
|
|
|
, pango, cairo, libinput, libcap, xwayland, pam, gdk_pixbuf, libpthreadstubs
|
|
|
|
, libXdmcp
|
2015-10-23 23:32:20 +00:00
|
|
|
}:
|
|
|
|
|
2016-07-17 07:31:41 +00:00
|
|
|
let
|
2017-09-27 18:17:58 +00:00
|
|
|
# TODO: Sway 0.14.0 with wlc 0.0.10 segfaults
|
2017-07-10 21:00:22 +00:00
|
|
|
version = "0.13.0";
|
2017-09-26 15:24:13 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
name = "sway-${version}";
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-26 15:24:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Sircmpwn";
|
|
|
|
repo = "sway";
|
|
|
|
rev = "${version}";
|
|
|
|
sha256 = "1vgk4rl51nx66yzpwg4yhnbj7wc30k5q0hh5lf8y0i1nvpal0p3q";
|
|
|
|
};
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-26 15:24:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper cmake pkgconfig
|
|
|
|
asciidoc libxslt docbook_xsl
|
|
|
|
];
|
|
|
|
buildInputs = [
|
2017-09-27 18:17:58 +00:00
|
|
|
wayland wlc libxkbcommon pixman fontconfig pcre json_c dbus_libs
|
2017-09-26 15:24:13 +00:00
|
|
|
pango cairo libinput libcap xwayland pam gdk_pixbuf libpthreadstubs
|
|
|
|
libXdmcp
|
|
|
|
];
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-26 15:24:13 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
|
|
|
|
'';
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-26 15:24:13 +00:00
|
|
|
makeFlags = "PREFIX=$(out)";
|
|
|
|
cmakeFlags = "-DVERSION=${version}";
|
|
|
|
installPhase = "PREFIX=$out make install";
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-27 18:17:58 +00:00
|
|
|
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc dbus_libs ];
|
2017-09-26 15:24:13 +00:00
|
|
|
preFixup = ''
|
|
|
|
wrapProgram $out/bin/sway \
|
|
|
|
--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
|
|
|
|
'';
|
2016-07-17 07:31:41 +00:00
|
|
|
|
2017-09-26 15:24:13 +00:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "i3-compatible window manager for Wayland";
|
|
|
|
homepage = http://swaywm.org;
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ primeos ]; # Trying to keep it up-to-date.
|
|
|
|
};
|
|
|
|
}
|