Subject: Re: Adding sfwbar package

From: Ian Eure <[email-masked]>
Date: Wed, 29 Jan 2025 20:36:18 -0800

Hi Josep,

Josep Bigorra wrote 4 days ago:
> 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.

> ---
>  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.

> +       (sha256
> +        (base32 
> "1jgd33fn5x213dg4fry35qg16yqg3c71a2psfwl6fsz5fp1iphcc"))))
> +    (native-inputs (list pkg-config))
> +    (inputs (list libmpdclient mpd pulseaudio alsa-lib 
> python-docutils (specification->package "[email-masked]") 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