3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/window-managers/sway/default.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

{ 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
}:
2017-10-17 02:47:59 +01:00
stdenv.mkDerivation rec {
name = "sway-${version}";
2017-10-17 02:47:59 +01:00
version = "0.14.0";
2016-07-17 08:31:41 +01:00
src = fetchFromGitHub {
owner = "Sircmpwn";
repo = "sway";
rev = "${version}";
2017-10-17 02:47:59 +01:00
sha256 = "1l8v9cdzd44bm4q71d47vqg6933b8j42q1a61r362vz2la1rcpq2";
};
2016-07-17 08:31:41 +01:00
nativeBuildInputs = [
makeWrapper cmake pkgconfig
asciidoc libxslt docbook_xsl
];
buildInputs = [
wayland wlc libxkbcommon pixman fontconfig pcre json_c dbus_libs
pango cairo libinput libcap xwayland pam gdk_pixbuf libpthreadstubs
libXdmcp
];
2016-07-17 08:31:41 +01:00
patchPhase = ''
sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
'';
2016-07-17 08:31:41 +01:00
makeFlags = "PREFIX=$(out)";
cmakeFlags = "-DVERSION=${version}";
installPhase = "PREFIX=$out make install";
2016-07-17 08:31:41 +01:00
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc dbus_libs ];
preFixup = ''
wrapProgram $out/bin/sway \
--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
'';
2016-07-17 08:31:41 +01: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.
};
}