depot/third_party/nixpkgs/pkgs/applications/window-managers/river/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

75 lines
1.7 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, zig
, wayland
, pkg-config
, scdoc
, xwayland
, wayland-protocols
, wlroots_0_16
, libxkbcommon
, pixman
, udev
, libevdev
, libinput
, libGL
, libX11
, xwaylandSupport ? true
}:
stdenv.mkDerivation rec {
pname = "river";
version = "0.2.3";
src = fetchFromGitHub {
owner = "riverwm";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-noZ2vo4J0cG3PN2k+2LzMc5WMtj0FEmMttE9obFH/tM=";
fetchSubmodules = true;
};
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
buildInputs = [
wayland-protocols
wlroots_0_16
libxkbcommon
pixman
udev
libevdev
libinput
libGL
] ++ lib.optional xwaylandSupport libX11;
dontConfigure = true;
preBuild = ''
export HOME=$TMPDIR
'';
installPhase = ''
runHook preInstall
zig build -Drelease-safe -Dcpu=baseline ${lib.optionalString xwaylandSupport "-Dxwayland"} -Dman-pages --prefix $out install
install contrib/river.desktop -Dt $out/share/wayland-sessions
runHook postInstall
'';
/* Builder patch install dir into river to get default config
When installFlags is removed, river becomes half broken.
See https://github.com/riverwm/river/blob/7ffa2f4b9e7abf7d152134f555373c2b63ccfc1d/river/main.zig#L56
*/
installFlags = [ "DESTDIR=$(out)" ];
passthru.providedSessions = ["river"];
meta = with lib; {
changelog = "https://github.com/ifreund/river/releases/tag/v${version}";
homepage = "https://github.com/ifreund/river";
description = "A dynamic tiling wayland compositor";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ fortuneteller2k adamcstephens rodrgz ];
};
}