1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 02:24:27 +00:00
nixpkgs/pkgs/applications/window-managers/sway/default.nix

45 lines
1.3 KiB
Nix
Raw Normal View History

2016-06-01 19:35:49 +01:00
{ stdenv, fetchFromGitHub, pango, libinput
, makeWrapper, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl, cairo
2017-02-15 15:28:01 +00:00
, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, dbus_libs, libcap
2017-04-05 13:17:49 +01:00
, xwayland
}:
2016-07-17 08:31:41 +01:00
let
2017-04-05 01:56:27 +01:00
version = "0.12.2";
2016-07-17 08:31:41 +01:00
in
stdenv.mkDerivation rec {
name = "sway-${version}";
src = fetchFromGitHub {
owner = "Sircmpwn";
repo = "sway";
rev = "${version}";
2017-04-05 01:56:27 +01:00
sha256 = "1hkr6pmz45xa5w5y21ijz7i2dwb62rifhcy28r8kh5r2hwbil2hs";
2016-07-17 08:31:41 +01:00
};
nativeBuildInputs = [ makeWrapper cmake pkgconfig asciidoc libxslt docbook_xsl ];
2017-04-05 13:17:49 +01:00
buildInputs = [ wayland wlc libxkbcommon pixman fontconfig pcre json_c dbus_libs pango cairo libinput libcap xwayland ];
2016-07-17 08:31:41 +01:00
patchPhase = ''
sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
'';
makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install";
LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc dbus_libs ];
preFixup = ''
wrapProgram $out/bin/sway \
--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
'';
meta = with stdenv.lib; {
description = "i3-compatible window manager for Wayland";
homepage = "http://swaywm.org";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}