diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-15 09:06:37 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-05 11:10:50 +0000 |
commit | 6d87dc71369d2730b360423138011752f7e29848 (patch) | |
tree | 5340052aa2857a80426be6bc32eae9e86ea52916 /pkgs/applications/misc/rivercarro | |
parent | 299723c8756b80b7d511776fa53ad25a74afe5e5 (diff) |
rivercarro: 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)
Diffstat (limited to 'pkgs/applications/misc/rivercarro')
-rw-r--r-- | pkgs/applications/misc/rivercarro/default.nix | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/pkgs/applications/misc/rivercarro/default.nix b/pkgs/applications/misc/rivercarro/default.nix index 0074a923f4179..ff53ba1a769f2 100644 --- a/pkgs/applications/misc/rivercarro/default.nix +++ b/pkgs/applications/misc/rivercarro/default.nix @@ -1,49 +1,47 @@ { lib , stdenv , fetchFromSourcehut -, zig +, pkg-config , river , wayland -, pkg-config +, zigHook }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "rivercarro"; version = "0.1.4"; src = fetchFromSourcehut { owner = "~novakane"; - repo = pname; + repo = "rivercarro"; + rev = "v${finalAttrs.version}"; fetchSubmodules = true; - rev = "v${version}"; - sha256 = "sha256-eATbbwIt5ytEVLPodyq9vFF9Rs5S1xShpvNYQnfwdV4="; + hash = "sha256-eATbbwIt5ytEVLPodyq9vFF9Rs5S1xShpvNYQnfwdV4="; }; nativeBuildInputs = [ pkg-config river wayland - zig + zigHook ]; - dontConfigure = true; - - preBuild = '' - export HOME=$TMPDIR - ''; - - installPhase = '' - runHook preInstall - zig build -Drelease-safe -Dcpu=baseline --prefix $out install - runHook postInstall - ''; - meta = with lib; { homepage = "https://git.sr.ht/~novakane/rivercarro"; description = "A layout generator for river Wayland compositor, fork of rivertile"; + longDescription = '' + A slightly modified version of rivertile layout generator for river. + + Compared to rivertile, rivercarro adds: + - Monocle layout, views will takes all the usable area on the screen. + - Gaps instead of padding around views or layout area. + - Modify gaps size at runtime. + - Smart gaps, if there is only one view, gaps will be disable. + - Limit the width of the usable area of the screen. + ''; + changelog = "https://git.sr.ht/~novakane/rivercarro/refs/v${finalAttrs.version}"; license = licenses.gpl3Plus; - platforms = platforms.linux; maintainers = with maintainers; [ kraem ]; + inherit (zigHook.meta) platforms; }; -} - +}) |