Adding sfwbar package

  • Open
  • quality assurance status badge
Details
2 participants
  • Ian Eure
  • Josep Bigorra
Owner
unassigned
Submitted by
Josep Bigorra
Severity
normal

Debbugs page

Josep Bigorra wrote 2 months ago
(address . guix-patches@gnu.org)
CAM_04A2Mn3J7VBjRsbYE4h8P4-2Wa5u51_eN=v7LcUuybSikow@mail.gmail.com
Hi all I am working on making a subset of Guix setup which is
accessible to all users, as part of the SSS project:

For this, I want to use sfwbar (https://github.com/LBCrion/sfwbar),
which is a nice Wayland taskbar, focused on floating window
compositors, like labwc. I think a lot of people will benefit from
having this package in Guix.

I have made a start, and the build phase succeeds, but am at a loss at
what is going wrong, could I get a hand?
The project uses meson to build so should make it easier for Guix.
I get an error like: RUNPATH validation failed and the
validate-runpath phase fails.

I am attaching the build logs and the PoC package definition,
Best,
Joe
(define-public swfbar (package (name "sfwbar") (version "v1.0_beta16") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/LBCrion/sfwbar.git") (commit "v1.0_beta16"))) (sha256 (base32 "1jgd33fn5x213dg4fry35qg16yqg3c71a2psfwl6fsz5fp1iphcc")))) (inputs (list pkg-config (specification->package "gtk+@3.24.41") json-c gtk-layer-shell)) (build-system meson-build-system) (synopsis "Flexible Wayland taskbar focused on stacking layout compositors.") (description "SFWBar (S* Floating Window Bar) is a flexible taskbar application for Wayland compositors, designed with a stacking layout in mind. Originally developed for Sway, SFWBar will work with any Wayland compositor supporting layer shell protocol, the taskbar and window switcher functionality shall work with any compositor supporting foreign top-level protocol, but the pager, and window placement functionality require sway (or at least i3 IPC support).") (home-page "https://github.com/LBCrion/sfwbar") (license license:gpl3+)))
Josep Bigorra wrote 2 months ago
New error message, now something with ninja?
(address . 75842@debbugs.gnu.org)
CAM_04A2hjZDk2+jgDCpn17gBgX5yp9ZYVUx5G-1WiMZe0P_5RA@mail.gmail.com
Got a bit further now, but now i get error with ninja?

```

(define-public swfbar
(package
(name "sfwbar")
(version "v1.0_beta16")
(source
(origin
(method git-fetch)
(uri (git-reference
(commit "v1.0_beta16")))
(sha256
(base32 "1jgd33fn5x213dg4fry35qg16yqg3c71a2psfwl6fsz5fp1iphcc"))))
(inputs (list pkg-config (specification->package "gtk+@3.24.41")
json-c gtk-layer-shell))
(build-system meson-build-system)
(arguments
(list
#:glib-or-gtk? #t
#:configure-flags
#~(list (string-append #$output "/lib"))))
(synopsis "Flexible Wayland taskbar focused on stacking layout
compositors.")
(description
"SFWBar (S* Floating Window Bar) is a flexible taskbar
application for Wayland compositors, designed with a stacking layout
in mind. Originally developed for Sway, SFWBar will work with any
Wayland compositor supporting layer shell protocol, the taskbar and
window switcher functionality shall work with any compositor
supporting foreign top-level protocol, but the pager, and window
placement functionality require sway (or at least i3 IPC support).")
(license license:gpl3+)))

```
Josep Bigorra wrote 2 months ago
ok now it seems like it's calling the wrong meson target?
(address . 75842@debbugs.gnu.org)
CAM_04A0POzXXOg2NY6vruQ+DVA4-AnPxY2zCOY44tWnanSd9GQ@mail.gmail.com
Hi, please see proper patch attached now, and new error message, yay,
sfwbar is undefined

Thanks in advance
From f301d17bb5e614830722f0d19131cc68eddf4533 Mon Sep 17 00:00:00 2001
Message-ID: <f301d17bb5e614830722f0d19131cc68eddf4533.1737846932.git.jjbigorra@gmail.com>
From: Josep Bigorra <jjbigorra@gmail.com>
Date: Sun, 26 Jan 2025 00:15:02 +0100
Subject: [PATCH] adding the sfwbar package to wm.scm

---
gnu/packages/wm.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index cc5da92eef..6875b47c17 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -2486,6 +2486,32 @@ (define-public waybar-experimental
#$flags))))
(synopsis "Waybar with experimental features"))))
+(define-public swfbar
+ (package
+ (name "sfwbar")
+ (version "v1.0_beta16")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/LBCrion/sfwbar.git")
+ (commit "v1.0_beta16")))
+ (sha256
+ (base32 "1jgd33fn5x213dg4fry35qg16yqg3c71a2psfwl6fsz5fp1iphcc"))))
+ (native-inputs (list pkg-config))
+ (inputs (list libmpdclient mpd pulseaudio alsa-lib python-docutils (specification->package "gtk+@3.24.41") json-c gtk-layer-shell))
+ (build-system meson-build-system)
+ (arguments
+ (list
+ #:glib-or-gtk? #t
+ #:configure-flags
+ #~(list (string-append #$output "/lib"))))
+ (synopsis "Flexible Wayland taskbar focused on stacking layout compositors.")
+ (description
+ "SFWBar (S* Floating Window Bar) is a flexible taskbar application for Wayland compositors, designed with a stacking layout in mind. Originally developed for Sway, SFWBar will work with any Wayland compositor supporting layer shell protocol, the taskbar and window switcher functionality shall work with any compositor supporting foreign top-level protocol, but the pager, and window placement functionality require sway (or at least i3 IPC support).")
+ (home-page "https://github.com/LBCrion/sfwbar")
+ (license license:gpl3+)))
+
(define-public wlr-randr
(package
(name "wlr-randr")
--
2.47.1
Ian Eure wrote 1 months ago
Re: Adding sfwbar package
87cyg4gbp9.fsf@retrospec.tv
Hi Josep,

Josep Bigorra wrote 4 days ago:
Toggle quote (5 lines)
> ok now it seems like it's calling the wrong meson target?
> Hi, please see proper patch attached now, and new error message,
> yay, sfwbar is undefined
>

I believe the issue is that you need to set the #:build-type
argument to meson-build-system. Take a look at (guix)Build
Systems in the Guix manual, and compare that with the sfwbar
README’s build from source instructions.


Toggle quote (25 lines)
> ---
> gnu/packages/wm.scm | 26 ++++++++++++++++++++++++++
> 1 file changed, 26 insertions(+)
>
> Toggle diff (39 lines)
> diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
> index cc5da92eef..6875b47c17 100644
> --- a/gnu/packages/wm.scm
> +++ b/gnu/packages/wm.scm
> @@ -2486,6 +2486,32 @@ (define-public waybar-experimental
> #$flags))))
> (synopsis "Waybar with experimental features"))))
>
> +(define-public swfbar
> + (package
> + (name "sfwbar")
> + (version "v1.0_beta16")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/LBCrion/sfwbar.git")
> + (commit "v1.0_beta16")))
>

Should be:

(commit version)))

...to keep the source/package versions from drifting.

Toggle quote (9 lines)
> + (sha256
> + (base32
> "1jgd33fn5x213dg4fry35qg16yqg3c71a2psfwl6fsz5fp1iphcc"))))
> + (native-inputs (list pkg-config))
> + (inputs (list libmpdclient mpd pulseaudio alsa-lib
> python-docutils (specification->package "gtk+@3.24.41") json-c
> gtk-layer-shell))
>

Please directly reference the variable holding the needed gtk
version instead of using specification->package to look it up.

This should also be run through `guix style' and pass `guix lint'.
You’ll likely need to fix up some things manually that `guix
style' doesn’t handle.

Thanks for taking this on!

-- Ian
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 75842@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 75842
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help