wayland window managers: orbment, sway, velox

This commit is contained in:
tg(x) 2015-10-24 01:32:20 +02:00 committed by Robin Gloster
parent 11b9ed9e63
commit 11b6e9a2f8
9 changed files with 324 additions and 0 deletions

View File

@ -0,0 +1,34 @@
{stdenv, fetchurl #, libX11, libXinerama, enableXft, libXft, zlib
, swc, wld, wayland, libxkbcommon, pixman, fontconfig
}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "dmenu-wayland-${version}";
version = "git-2014-11-02";
rev = "6e08b77428cc3c406ed2e90d4cae6c41df76341e";
src = fetchurl {
url = "https://github.com/michaelforney/dmenu/archive/${rev}.tar.gz";
sha256 = "d0f73e442baf44a93a3b9d41a72e9cfa14f54af6049c90549f516722e3f88019";
};
buildInputs = [ swc wld wayland libxkbcommon pixman fontconfig ];
postPatch = ''
sed -ri -e 's!\<(dmenu|dmenu_path)\>!'"$out/bin"'/&!g' dmenu_run
'';
preConfigure = [
''sed -i "s@PREFIX = /usr/local@PREFIX = $out@g; s@/usr/share/swc@$(echo "$nativeBuildInputs" | grep -o '[^ ]*-swc-[^ ]*')/share/swc@g" config.mk''
];
meta = {
description = "a generic, highly customizable, and efficient menu for the X Window System";
homepage = http://tools.suckless.org/dmenu;
license = stdenv.lib.licenses.mit;
maintainers = with stdenv.lib.maintainers; [ ];
platforms = with stdenv.lib.platforms; all;
};
}

View File

@ -0,0 +1,34 @@
{ stdenv, fetchurl, pkgconfig, writeText
, ncurses, wayland, wld, libxkbcommon, fontconfig, pixman
, conf? null}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "st-wayland-${version}";
version = "git-2015-08-29";
rev = "61b47b76a09599c8093214e28c48938f5b424daa";
src = fetchurl {
url = "https://github.com/michaelforney/st/archive/${rev}.tar.gz";
sha256 = "7164da135f02405dba5ae3131dfd896e072df29ac6c0928f3b887beffb8a7d97";
};
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
buildInputs = [ pkgconfig ncurses wayland wld libxkbcommon fontconfig pixman ];
NIX_LDFLAGS = "-lfontconfig";
installPhase = ''
TERMINFO=$out/share/terminfo make install PREFIX=$out
'';
meta = {
homepage = http://st.suckless.org/;
license = stdenv.lib.licenses.mit;
maintainers = with maintainers; [ ];
platforms = with platforms; linux;
};
}

View File

@ -0,0 +1,57 @@
{ lib, stdenv, fetchurl, makeWrapper, cmake, pkgconfig
, wlc, dbus_libs, wayland, libxkbcommon, pixman, libinput, udev, zlib, libpng, libdrm, libX11
}:
stdenv.mkDerivation rec {
name = "orbment-${version}";
version = "git-2015-09-30";
repo = "https://github.com/Cloudef/orbment";
rev = "229a870dbbb9dbc66c137cf2747eab11acdf1a95";
chck_repo = "https://github.com/Cloudef/chck";
chck_rev = "6191a69572952291c137294317874c06c9c0d6a9";
inihck_repo = "https://github.com/Cloudef/inihck";
inihck_rev = "462cbd5fd67226714ac2bdfe4ceaec8e251b2d9c";
srcs = [
(fetchurl {
url = "${repo}/archive/${rev}.tar.gz";
sha256 = "7aaa0262d078adaf47abdf500b9ea581f6bec164c195a44a3c165a865414ca2c";
})
(fetchurl {
url = "${chck_repo}/archive/${chck_rev}.tar.gz";
sha256 = "26b4af1390bf67c674732cad69fc94fb027a3d269241d0bd862f42fb80bd5160";
})
(fetchurl {
url = "${inihck_repo}/archive/${inihck_rev}.tar.gz";
sha256 = "d21f2ac25eafed285614f5f0ef7a1014d629ba382f4e64bc89fe2c3e98c2777f";
})
];
sourceRoot = "orbment-${rev}";
postUnpack = ''
rm -rf orbment-${rev}/lib/chck orbment-${rev}/lib/inihck
ln -s ../../chck-${chck_rev} orbment-${rev}/lib/chck
ln -s ../../inihck-${inihck_rev} orbment-${rev}/lib/inihck
'';
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ makeWrapper wlc dbus_libs wayland libxkbcommon pixman libinput udev zlib libpng libX11 libdrm ];
makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install";
LD_LIBRARY_PATH = lib.makeLibraryPath [ libX11 libdrm dbus_libs ];
preFixup = ''
wrapProgram $out/bin/orbment \
--prefix LD_LIBRARY_PATH : "${LD_LIBRARY_PATH}";
'';
meta = {
description = "Modular Wayland compositor";
homepage = repo;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

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

View File

@ -0,0 +1,29 @@
{ lib, stdenv, fetchurl, fetchFromGitHub, pkgconfig
, swc, libxkbcommon
, wld, wayland, pixman, fontconfig
}:
stdenv.mkDerivation rec {
name = "velox-${version}";
version = "git-2015-09-23";
src = fetchurl {
url = "https://github.com/michaelforney/velox/archive/499768b5834967727e3d91139b4013b6aca95762.tar.gz";
sha256 = "252959f0f0ff593c187449b61c234c214fdf321e3f4e8b5d9e3c2949d932a0a2";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ swc libxkbcommon wld wayland pixman fontconfig ];
makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install";
meta = {
description = "velox window manager";
homepage = "https://github.com/michaelforney/velox";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, pkgconfig
, wld, wayland, xwayland, fontconfig, pixman, libdrm, libinput, libevdev, libxkbcommon, libxcb, xcbutilwm
}:
stdenv.mkDerivation rec {
name = "swc-${version}";
version = "git-2015-09-05";
repo = "https://github.com/michaelforney/swc";
rev = "0dff35ad9b80fc62e6b48417f78c24df6648c9d2";
src = fetchurl {
url = "${repo}/archive/${rev}.tar.gz";
sha256 = "7af5655b5bb5fe59bb8e6643e35f794419850463b1d7f44f29b45ab6aee01ae9";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ wld wayland xwayland fontconfig pixman libdrm libinput libevdev libxkbcommon libxcb xcbutilwm ];
makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install";
meta = {
description = "A library for making a simple Wayland compositor";
homepage = repo;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -0,0 +1,58 @@
{ lib, stdenv, fetchurl, cmake, pkgconfig
, glibc, wayland, pixman, libxkbcommon, libinput, libxcb, xcbutilwm, xcbutilimage, mesa, libdrm, udev, systemd, dbus_libs
, libpthreadstubs, libX11, libXau, libXdmcp, libXext, libXdamage, libxshmfence, libXxf86vm, linuxPackages_4_2
}:
stdenv.mkDerivation rec {
name = "wlc-${version}";
version = "git-2015-10-04";
repo = "https://github.com/Cloudef/wlc";
rev = "74d978cc54fd8256777c8d39327cb677523cddff";
chck_repo = "https://github.com/Cloudef/chck";
chck_rev = "6191a69572952291c137294317874c06c9c0d6a9";
srcs = [
(fetchurl {
url = "${repo}/archive/${rev}.tar.gz";
sha256 = "a3641e79252a140be089dd2e829b4d21a3b5ff10866951568d54bd4600597254";
})
(fetchurl {
url = "${chck_repo}/archive/${chck_rev}.tar.gz";
sha256 = "26b4af1390bf67c674732cad69fc94fb027a3d269241d0bd862f42fb80bd5160";
})
];
sourceRoot = "wlc-${rev}";
postUnpack = ''
rm -rf wlc-${rev}/lib/chck
ln -s ../../chck-${chck_rev} wlc-${rev}/lib/chck
'';
patchPhase = ''
( echo '#include <stdlib.h>';
echo '#include <libdrm/drm.h>';
cat src/platform/backend/drm.c
) >src/platform/backend/drm.c-fix;
mv src/platform/backend/drm.c-fix src/platform/backend/drm.c;
'';
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [
wayland pixman libxkbcommon libinput libxcb xcbutilwm xcbutilimage mesa libdrm udev
libpthreadstubs libX11 libXau libXdmcp libXext libXdamage libxshmfence libXxf86vm
systemd dbus_libs
];
makeFlags = "PREFIX=$(out) -lchck";
installPhase = "PREFIX=$out make install";
meta = {
description = "A library for making a simple Wayland compositor";
homepage = repo;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, pkgconfig
, wayland, fontconfig, pixman, freetype, libdrm
}:
stdenv.mkDerivation rec {
name = "wld-${version}";
version = "git-2015-09-01";
repo = "https://github.com/michaelforney/wld";
rev = "efe0a1ed1856a2e4a1893ed0f2d7dde43b5627f0";
src = fetchurl {
url = "${repo}/archive/${rev}.tar.gz";
sha256 = "09388f7828e18c75e7b8d41454903886a725d7a868f60e66c128bd7d2e953ee1";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ wayland fontconfig pixman freetype libdrm ];
makeFlags = "PREFIX=$(out)";
installPhase = "PREFIX=$out make install";
meta = {
description = "A primitive drawing library targeted at Wayland";
homepage = repo;
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ ];
};
}

View File

@ -11546,6 +11546,8 @@ let
dmenu = callPackage ../applications/misc/dmenu { };
dmenu-wayland = callPackage ../applications/misc/dmenu/wayland.nix { };
dmenu2 = callPackage ../applications/misc/dmenu2 { };
dmtx = dmtx-utils;
@ -12266,6 +12268,14 @@ let
spectrwm = callPackage ../applications/window-managers/spectrwm { };
wlc = callPackage ../development/libraries/wlc { };
orbment = callPackage ../applications/window-managers/orbment { };
sway = callPackage ../applications/window-managers/sway { };
swc = callPackage ../development/libraries/swc { };
wld = callPackage ../development/libraries/wld { };
velox = callPackage ../applications/window-managers/velox { };
i3 = callPackage ../applications/window-managers/i3 {
xcb-util-cursor = if stdenv.isDarwin then xcb-util-cursor-HEAD else xcb-util-cursor;
};
@ -13262,6 +13272,10 @@ let
conf = config.st.conf or null;
};
st-wayland = callPackage ../applications/misc/st/wayland.nix {
conf = config.st.conf or null;
};
stag = callPackage ../applications/misc/stag {
curses = ncurses;
};