Merge pull request #13915 from joachifm/fix-sway

sway: fix build
This commit is contained in:
Robin Gloster 2016-03-14 15:11:22 +01:00
commit 0713c1c630

View File

@ -1,21 +1,23 @@
{ lib, stdenv, fetchurl, makeWrapper, cmake, pkgconfig { stdenv, fetchFromGitHub
, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, asciidoc, libxslt, dbus_libs , makeWrapper, cmake, pkgconfig, asciidoc, libxslt, docbook_xsl
, wayland, wlc, libxkbcommon, pixman, fontconfig, pcre, json_c, dbus_libs
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "sway-${version}"; name = "sway-${version}";
version = "git-2016-02-08"; version = "git-2016-02-08";
repo = "https://github.com/SirCmpwn/sway";
rev = "16e904634c65128610537bed7fcb16ac3bb45165";
src = fetchurl { src = fetchFromGitHub {
url = "${repo}/archive/${rev}.tar.gz"; owner = "Sircmpwn";
sha256 = "52d6c4b49fea69e2a2c1b44b858908b7736301bdb9ed483c294bc54bb40e872e"; repo = "sway";
rev = "16e904634c65128610537bed7fcb16ac3bb45165";
sha256 = "04qvdjaarglq3qsjbb9crjkad3y1v7s51bk82sl8w26c71jbhklg";
}; };
nativeBuildInputs = [ cmake pkgconfig ]; nativeBuildInputs = [ makeWrapper cmake pkgconfig asciidoc libxslt docbook_xsl ];
buildInputs = [ makeWrapper wayland wlc libxkbcommon pixman fontconfig pcre json_c asciidoc libxslt dbus_libs ]; buildInputs = [ wayland wlc libxkbcommon pixman fontconfig pcre json_c dbus_libs ];
patchPhase = '' patchPhase = ''
sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt; sed -i s@/etc/sway@$out/etc/sway@g CMakeLists.txt;
@ -24,17 +26,17 @@ stdenv.mkDerivation rec {
makeFlags = "PREFIX=$(out)"; makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install"; installPhase = "PREFIX=$out make install";
LD_LIBRARY_PATH = lib.makeLibraryPath [ wlc dbus_libs ]; LD_LIBRARY_PATH = stdenv.lib.makeLibraryPath [ wlc dbus_libs ];
preFixup = '' preFixup = ''
wrapProgram $out/bin/sway \ wrapProgram $out/bin/sway \
--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}"; --prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
''; '';
meta = { meta = with stdenv.lib; {
description = "i3-compatible window manager for Wayland"; description = "i3-compatible window manager for Wayland";
homepage = "http://swaywm.org"; homepage = "http://swaywm.org";
license = lib.licenses.mit; license = licenses.mit;
platforms = lib.platforms.linux; platforms = platforms.linux;
maintainers = with lib.maintainers; [ ]; maintainers = with maintainers; [ ];
}; };
} }