Subject: [PATCH v1 3/3] gnu: Add beanbag.

From: Ashvith Shetty <[email-masked]>
Date: Fri, 21 Feb 2025 00:39:12 +0530

From: Ashvith Shetty <[email-masked]>

* gnu/packages/zig-xyz.scm (beanbag): New variable.

Change-Id: I07ebb8f6e632e4c24e183ad8d9f01f1bf17373f0
---
 gnu/packages/zig-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index e8fa59227d..03118cfe85 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -189,6 +189,44 @@ (define-public zig-known-folders
       (home-page "https://github.com/ziglibs/known-folders")
       (license license:expat))))
 
+(define-public beanbag
+  (package
+    (name "beanbag")
+    (version "0.1.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://codeberg.org/bwbuhse/beanbag")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1d2h5bqicqnyawswdq7bg1w9frjk0ra2sva1as2qgc5s7pjclyql"))
+       (snippet (rename-zig-dependencies '(("clap" . "zig-clap")
+                                           ("zigimg" . "zig-img"))))))
+    (build-system zig-build-system)
+    (arguments
+     (list
+      ;; Nothing to test
+      #:tests? #f
+      #:install-source? #f
+      #:zig-release-type "safe"
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'remove-deps
+                     (lambda* (#:key inputs #:allow-other-keys)
+                       (delete-file-recursively "protocol")
+                       (substitute* "build.zig"
+                         (("protocol\\/wlr-layer-shell-unstable-v1.xml")
+                          (string-append (search-input-file inputs
+                                          "share/wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml")))))))))
+    (inputs (list zig-clap zig-img zig-pixman zig-wayland))
+    (native-inputs (list pkg-config wlr-protocols))
+    (home-page "https://codeberg.org/bwbuhse/beanbag")
+    (synopsis "Wallpaper app for Wayland compositors")
+    (description
+     "beanbag is a wallpaper app for Wayland compositors, heavily inspired by dnkl's wbg.")
+    (license license:gpl3)))
+
 (define-public zig-pixman
   (package
     (name "zig-pixman")
-- 
2.48.1