Subject: [bug#76910] [PATCH v3 2/5] gnu: Add hyprscroller.

From: Gabriel Santos <[email-masked]>
Date: Sat, 29 Mar 2025 13:16:37 -0300

From: Andrew Wong <[email-masked]>

* gnu/packages/wm.scm (hyprscroller): New variable.

Change-Id: I56c9984c7ce013f0ce4b22ec1f5df778fe17f736
---
 gnu/packages/wm.scm | 49 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 15b70df731..38f492692f 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -522,6 +522,55 @@ (define-public hyprwinwrap
 (define-public xtra-dispatchers
   (hyprland-plugin "xtra-dispatchers" "extra dispatchers"))
 
+(define-public hyprscroller
+  (package
+    (name "hyprscroller")
+    ;; Upstream has no tags, but we can use the commits which add support for
+    ;; the corresponding Hyprland version (see ./hyprscoller.toml).
+    (version "0.48.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dawsers/hyprscroller")
+             (commit "5b62ca58790f8c2961da79af95efa458f6a814fe")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0bg2gcrdgz68r8anchhb46hn9l5pancr9h83a2fav96bwyhwx2cs"))))
+    (build-system cmake-build-system)
+    (native-inputs (list gcc-14 pkg-config))
+    (inputs (list aquamarine
+                  hyprgraphics
+                  hyprlang
+                  hyprutils
+                  libdrm
+                  libinput
+                  libxkbcommon
+                  mesa
+                  pango
+                  pixman
+                  wayland
+                  hyprland))
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (delete 'configure)
+          (delete 'check)
+          (replace 'install
+            (lambda* _
+              (install-file "hyprscroller.so"
+                            (string-append #$output "/lib")))))))
+    (home-page "https://github.com/dawsers/hyprscroller")
+    (synopsis "Hyprland plugin for a PaperWM-like scrolling layout")
+    (description
+     "Hyprscroller is a Hyprland layout plugin that creates a window layout
+similar to PaperWM.  The plugin supports gaps, borders, decorations,
+special workspace, full screen modes, overview, marks, pinned columns,
+touchpad gestures, copying/pasting windows, trails/trailmarks, quick
+jump mode, and installation through hyprpm.")
+    (license license:expat)))
+
 (define-public i3status
   (package
     (name "i3status")
-- 
2.49.0