[bug#75522,v0,4/4] gnu: Add beanbag.

Message ID 20250112181920.8248-4-ashvithshetty10@gmail.com
State New
Headers
Series Add beanbag |

Commit Message

Ashvith Shetty Jan. 12, 2025, 6:19 p.m. UTC
  * gnu/packages/zig-xyz.scm (beanbag): New variable.

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

Patch

diff --git a/gnu/packages/zig-xyz.scm b/gnu/packages/zig-xyz.scm
index a6f5fbd453..64ee303854 100644
--- a/gnu/packages/zig-xyz.scm
+++ b/gnu/packages/zig-xyz.scm
@@ -189,6 +189,47 @@  (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.2")
+    (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 "0i37hvg4jz9v2wfx41ycyqfq87wdh6nawgpic1mmqnj32jglkx7y"))
+       (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"
+                         (("b\\.path\\(\"protocol\\/wlr-layer-shell-unstable-v1.xml\"\\)")
+                          (string-append ".{ .cwd_relative = \""
+                                         (search-input-file inputs
+                                          "share/wlr-protocols/unstable/wlr-layer-shell-unstable-v1.xml")
+                                         "\" }"))))))))
+    (inputs (list zig-clap zig-img zig-pixman zig-wayland-beanbag
+                  wlr-protocols))
+    (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")