mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 20:39:04 +02:00
river: use zigHook
Also, a cosmetic refactor: - Reorder parameter listing - Use rec-less, overlay-style overridable recursive attributes (in effect since NixOS#119942); - Remove nested with (according to https://nix.dev/recipes/best-practices#with-scopes) - Add `meta.longDescription`
This commit is contained in:
parent
ba1c193d28
commit
c4867cc794
|
@ -1,75 +1,90 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, zig
|
||||
, wayland
|
||||
, pkg-config
|
||||
, scdoc
|
||||
, xwayland
|
||||
, wayland-protocols
|
||||
, wlroots_0_16
|
||||
, libxkbcommon
|
||||
, pixman
|
||||
, udev
|
||||
, libevdev
|
||||
, libinput
|
||||
, libGL
|
||||
, libX11
|
||||
, libevdev
|
||||
, libinput
|
||||
, libxkbcommon
|
||||
, pixman
|
||||
, pkg-config
|
||||
, scdoc
|
||||
, udev
|
||||
, wayland
|
||||
, wayland-protocols
|
||||
, wlroots_0_16
|
||||
, xwayland
|
||||
, zigHook
|
||||
, xwaylandSupport ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "river";
|
||||
version = "0.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "riverwm";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-cIcO6owM6eYn+obYVaBOVQpnBx4++KOqQk5Hzo3GcNs=";
|
||||
repo = "river";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-cIcO6owM6eYn+obYVaBOVQpnBx4++KOqQk5Hzo3GcNs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ zig wayland xwayland scdoc pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
scdoc
|
||||
wayland
|
||||
xwayland
|
||||
zigHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
wayland-protocols
|
||||
wlroots_0_16
|
||||
libGL
|
||||
libevdev
|
||||
libinput
|
||||
libxkbcommon
|
||||
pixman
|
||||
udev
|
||||
libevdev
|
||||
libinput
|
||||
libGL
|
||||
wayland-protocols
|
||||
wlroots_0_16
|
||||
] ++ lib.optional xwaylandSupport libX11;
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
preBuild = ''
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
zigBuildFlags = [
|
||||
"-Dman-pages"
|
||||
]
|
||||
++ lib.optional xwaylandSupport "-Dxwayland";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
zig build -Drelease-safe -Dcpu=baseline ${lib.optionalString xwaylandSupport "-Dxwayland"} -Dman-pages --prefix $out install
|
||||
postInstall = ''
|
||||
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" ];
|
||||
|
||||
passthru.providedSessions = ["river"];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/ifreund/river/releases/tag/v${version}";
|
||||
meta = {
|
||||
homepage = "https://github.com/ifreund/river";
|
||||
description = "A dynamic tiling wayland compositor";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ fortuneteller2k adamcstephens rodrgz ];
|
||||
longDescription = ''
|
||||
River is a dynamic tiling Wayland compositor with flexible runtime
|
||||
configuration.
|
||||
|
||||
Its design goals are:
|
||||
- Simple and predictable behavior, river should be easy to use and have a
|
||||
low cognitive load.
|
||||
- Window management based on a stack of views and tags.
|
||||
- Dynamic layouts generated by external, user-written executables. A
|
||||
default rivertile layout generator is provided.
|
||||
- Scriptable configuration and control through a custom Wayland protocol
|
||||
and separate riverctl binary implementing it.
|
||||
'';
|
||||
changelog = "https://github.com/ifreund/river/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [
|
||||
adamcstephens
|
||||
fortuneteller2k
|
||||
rodrgz
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue