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.

76 lines
1.7 KiB
Nix
Raw Normal View History

{ lib
, stdenv
, fetchFromGitHub
, zig
, wayland
, pkg-config
, scdoc
, xwayland
, wayland-protocols
2023-01-02 16:23:02 +00:00
, wlroots_0_16
, 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";
2023-02-10 18:16:35 +00:00
version = "0.2.4";
src = fetchFromGitHub {
2022-01-21 18:59:22 +00:00
owner = "riverwm";
repo = pname;
2023-01-08 23:01:45 +00:00
rev = "refs/tags/v${version}";
2023-02-10 18:16:35 +00:00
hash = "sha256-cIcO6owM6eYn+obYVaBOVQpnBx4++KOqQk5Hzo3GcNs=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
buildInputs = [
wayland-protocols
2023-01-02 16:23:02 +00:00
wlroots_0_16
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
2022-11-28 16:19:15 +00:00
install contrib/river.desktop -Dt $out/share/wayland-sessions
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)" ];
2022-11-28 16:19:15 +00:00
passthru.providedSessions = ["river"];
meta = with lib; {
2023-01-28 14:48:28 +00:00
changelog = "https://github.com/ifreund/river/releases/tag/v${version}";
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;
2023-01-28 14:48:28 +00:00
maintainers = with maintainers; [ fortuneteller2k adamcstephens rodrgz ];
};
}