nixpkgs/pkgs/applications/window-managers/river/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

72 lines
1.5 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, zig
, wayland
, pkg-config
, scdoc
, xwayland
, wayland-protocols
, wlroots
, libxkbcommon
, pixman
, udev
, libevdev
2021-06-30 02:53:05 +00:00
, libinput
, libGL
2022-02-05 20:21:34 +00:00
, libX11
, xwaylandSupport ? true
}:
stdenv.mkDerivation rec {
pname = "river";
2022-02-05 20:21:34 +00:00
version = "0.1.3";
src = fetchFromGitHub {
2022-01-21 18:59:22 +00:00
owner = "riverwm";
repo = pname;
2021-11-03 07:10:42 +00:00
rev = "v${version}";
2022-02-05 20:21:34 +00:00
sha256 = "sha256-bHfHhyDx/Wzhvhr7mAeVzJf0TBJgMTGb/ClGjWMLlQ8=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
buildInputs = [
wayland-protocols
wlroots
libxkbcommon
pixman
udev
libevdev
2021-06-30 02:53:05 +00:00
libinput
libGL
] ++ lib.optional xwaylandSupport libX11;
dontConfigure = true;
2021-05-01 16:18:33 +00:00
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
runHook preInstall
zig build -Drelease-safe -Dcpu=baseline ${lib.optionalString xwaylandSupport "-Dxwayland"} -Dman-pages --prefix $out install
runHook postInstall
'';
2022-01-21 18:59:22 +00:00
/* Builder patch install dir into river to get default config
2022-02-05 20:21:34 +00:00
When installFlags is removed, river becomes half broken.
See https://github.com/riverwm/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
*/
2021-05-01 16:18:33 +00:00
installFlags = [ "DESTDIR=$(out)" ];
meta = with lib; {
2021-05-01 16:18:33 +00:00
homepage = "https://github.com/ifreund/river";
description = "A dynamic tiling wayland compositor";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ fortuneteller2k ];
};
}