GNU bug report logs - #44789
gnu: Add lemonbar-xft.

Previous Next

Package: guix-patches;

Reported by: elaexuotee <at> wilsonb.com

Date: Sun, 22 Nov 2020 05:31:02 UTC

Severity: normal

Done: Christopher Baines <mail <at> cbaines.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44789 in the body.
You can then email your comments to 44789 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#44789; Package guix-patches. (Sun, 22 Nov 2020 05:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to elaexuotee <at> wilsonb.com:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 22 Nov 2020 05:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: elaexuotee <at> wilsonb.com
To: guix-patches <at> gnu.org
Subject: gnu: Add lemonbar-xft.
Date: Sun, 22 Nov 2020 14:30:01 +0900
[Message part 1 (text/plain, inline)]
This adds a fork of the `lemonbar' package that supports fontconfig.

[0001-gnu-Add-lemonbar-xft.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#44789; Package guix-patches. (Sat, 28 Nov 2020 16:47:01 GMT) Full text and rfc822 format available.

Message #8 received at 44789 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: elaexuotee <at> wilsonb.com
Cc: 44789 <at> debbugs.gnu.org
Subject: Re: [bug#44789] gnu: Add lemonbar-xft.
Date: Sat, 28 Nov 2020 16:46:09 +0000
[Message part 1 (text/plain, inline)]
elaexuotee--- via Guix-patches via <guix-patches <at> gnu.org> writes:

> This adds a fork of the `lemonbar' package that supports fontconfig.

I don't know anything about lemonbar, but this sounds OK in principle.


gnu/packages/wm.scm(lemonbar-xft): New variable.
---
 gnu/packages/wm.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 361cecf26f..7d9b591545 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -37,6 +37,7 @@ 
 ;;; Copyright © 2020 Marcin Karpezo <sirmacik <at> wioo.waw.pl>
 ;;; Copyright © 2020 EuAndreh <eu <at> euandre.org>
 ;;; Copyright © 2020 Michael Rohleder <mike <at> rohleder.de>
+;;; Copyright © 2020 B. Wilson <elaexuotee <at> wilsonb.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1931,6 +1932,40 @@  formatting, RandR and Xinerama support and EWMH compliance without
 wasting your precious memory.")
       (license license:x11))))
 
+(define-public lemonbar-xft
+  ;; Upstream v2.0 tag is several years behind HEAD
+  (let ((commit "481e12363e2a0fe0ddd2176a8e003392be90ed02"))
+    (package
+      (inherit lemonbar)
+      (name "lemonbar-xft")
+      (version (string-append "2.0." (string-take commit 7)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/drscream/lemonbar-xft")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "0588g37h18lv50h7w8vfbwhvc3iajh7sdr53848spaif99nh3mh4"))))
+      (inputs `(("freetype" ,freetype)
+                ("libxft" ,libxft)
+                ("libx11" ,libx11)
+                ,@(package-inputs lemonbar)))
+      (arguments
+       `(#:tests? #f                    ;no test suite
+         #:make-flags
+         (list
+          (string-append "CC=" ,(cc-for-target))
+          (string-append "PREFIX=" %output)
+          (string-append "CFLAGS="
+                         (string-join
+                          (list (string-append "-I" (assoc-ref %build-inputs "freetype")
+                                               "/include/freetype2")
+                                (string-append "-D" "VERSION="
+                                               (format #f "'~s'" ,version))))))
+         #:phases (modify-phases %standard-phases (delete 'configure)))))))

So, it would be nice to change the description (and maybe synopsis) to
set out how this package is different from lemonbar.

Also, regarding the arguments above, I think you can reduce the
duplication with the lemonbar package by doing something like:

  (arguments
   (substitute-keyword-arguments (package-arguments lemonbar)
     ((#:make-flags make-flags)
      (append make-flags
              (string-append
               "CFLAGS="
               (string-join
                (list (string-append "-I" (assoc-ref %build-inputs "freetype")
                                     "/include/freetype2")
                      (string-append "-D" "VERSION="
                                     (format #f "'~s'" ,version)))))))))

I've only just written this in this email, so I'm not sure if it works,
but I think it's close.

Would you be able to send an updated patch?

Thanks,

Chris
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#44789; Package guix-patches. (Wed, 09 Dec 2020 06:55:01 GMT) Full text and rfc822 format available.

Message #11 received at 44789 <at> debbugs.gnu.org (full text, mbox):

From: elaexuotee <at> wilsonb.com
To: Christopher Baines <mail <at> cbaines.net>
Cc: 44789 <at> debbugs.gnu.org
Subject: Re: [bug#44789] gnu: Add lemonbar-xft.
Date: Wed, 09 Dec 2020 15:53:44 +0900
[Message part 1 (text/plain, inline)]
Christopher Baines <mail <at> cbaines.net> wrote:
> 
> elaexuotee--- via Guix-patches via <guix-patches <at> gnu.org> writes:
> 
> > This adds a fork of the `lemonbar' package that supports fontconfig.
> 
> I don't know anything about lemonbar, but this sounds OK in principle.

Thanks for the sanity check.

> So, it would be nice to change the description (and maybe synopsis) to
> set out how this package is different from lemonbar.

Oh cool. I have run across several packages that `inherit` from their parents
without modifying the description, so just kind of blindly followed suit.
Actually, checking package sources however, it looks like inheriting packages
*do* update synopses and descriptions.

> Also, regarding the arguments above, I think you can reduce the
> duplication with the lemonbar package by doing something like:
> 
>   (arguments
>    (substitute-keyword-arguments (package-arguments lemonbar)
>      ((#:make-flags make-flags)
>       (append make-flags
>               (string-append
>                "CFLAGS="
>                (string-join
>                 (list (string-append "-I" (assoc-ref %build-inputs "freetype")
>                                      "/include/freetype2")
>                       (string-append "-D" "VERSION="
>                                      (format #f "'~s'" ,version)))))))))
> 
> I've only just written this in this email, so I'm not sure if it works,
> but I think it's close.

Very nice. It required a tad bit of munging, but was very helpful.

> Would you be able to send an updated patch?

Attached!

Note that I opted to `string-append` to lemonbar's synopsis and description.
This doesn't seem to be common, but does it make sense here?

[0001-gnu-Add-lemonbar-xft.patch (text/x-patch, attachment)]

Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Wed, 09 Dec 2020 09:16:02 GMT) Full text and rfc822 format available.

Notification sent to elaexuotee <at> wilsonb.com:
bug acknowledged by developer. (Wed, 09 Dec 2020 09:16:02 GMT) Full text and rfc822 format available.

Message #16 received at 44789-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: elaexuotee <at> wilsonb.com
Cc: 44789-done <at> debbugs.gnu.org
Subject: Re: [bug#44789] gnu: Add lemonbar-xft.
Date: Wed, 09 Dec 2020 09:14:56 +0000
[Message part 1 (text/plain, inline)]
elaexuotee <at> wilsonb.com writes:

>> Would you be able to send an updated patch?
>
> Attached!
>
> Note that I opted to `string-append` to lemonbar's synopsis and description.
> This doesn't seem to be common, but does it make sense here?

I think that's OK. I tweaked the indentation, set a home-page and pushed
to master as 8e2aad26ae9b7365db83d4f6c74e9e79c57766a6.

Thanks!

Chris
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 06 Jan 2021 12:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.