all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#44789] gnu: Add lemonbar-xft.
@ 2020-11-22  5:30 elaexuotee--- via Guix-patches via
  2020-11-28 16:46 ` Christopher Baines
  0 siblings, 1 reply; 4+ messages in thread
From: elaexuotee--- via Guix-patches via @ 2020-11-22  5:30 UTC (permalink / raw)
  To: 44789

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-lemonbar-xft.patch --]
[-- Type: text/x-patch, Size: 2649 bytes --]

From 2a6f0059f8c5ca687c68c667d88a58c98f6c12ba Mon Sep 17 00:00:00 2001
From: "B. Wilson" <elaexuotee@wilsonb.com>
Date: Sun, 22 Nov 2020 14:23:48 +0900
Subject: [PATCH] gnu: Add lemonbar-xft.
To: guix-patches@gnu.org

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@wioo.waw.pl>
 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 B. Wilson <elaexuotee@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)))))))
+
 (define-public xclickroot
   (let ((commit "309fd17174dba4149b5ea66654c6fd02cfcf7c9a")
         (revision "1"))
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#44789] gnu: Add lemonbar-xft.
  2020-11-22  5:30 [bug#44789] gnu: Add lemonbar-xft elaexuotee--- via Guix-patches via
@ 2020-11-28 16:46 ` Christopher Baines
  2020-12-09  6:53   ` elaexuotee--- via Guix-patches via
  0 siblings, 1 reply; 4+ messages in thread
From: Christopher Baines @ 2020-11-28 16:46 UTC (permalink / raw)
  To: elaexuotee; +Cc: 44789

[-- Attachment #1: Type: text/plain, Size: 3431 bytes --]


elaexuotee--- via Guix-patches via <guix-patches@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@wioo.waw.pl>
 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 B. Wilson <elaexuotee@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#44789] gnu: Add lemonbar-xft.
  2020-11-28 16:46 ` Christopher Baines
@ 2020-12-09  6:53   ` elaexuotee--- via Guix-patches via
  2020-12-09  9:14     ` bug#44789: " Christopher Baines
  0 siblings, 1 reply; 4+ messages in thread
From: elaexuotee--- via Guix-patches via @ 2020-12-09  6:53 UTC (permalink / raw)
  To: Christopher Baines; +Cc: 44789

[-- Attachment #1: Type: text/plain, Size: 1746 bytes --]

Christopher Baines <mail@cbaines.net> wrote:
> 
> elaexuotee--- via Guix-patches via <guix-patches@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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-lemonbar-xft.patch --]
[-- Type: text/x-patch, Size: 2918 bytes --]

From 321caf9ba721e0c41dda64298093f1aea1b95b63 Mon Sep 17 00:00:00 2001
From: "B. Wilson" <elaexuotee@wilsonb.com>
Date: Sun, 22 Nov 2020 14:23:48 +0900
Subject: [PATCH] gnu: Add lemonbar-xft.
To: guix-patches@gnu.org

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

diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm
index 361cecf26f..08b3653c32 100644
--- a/gnu/packages/wm.scm
+++ b/gnu/packages/wm.scm
@@ -37,6 +37,7 @@
 ;;; Copyright © 2020 Marcin Karpezo <sirmacik@wioo.waw.pl>
 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
+;;; Copyright © 2020 B. Wilson <elaexuotee@wilsonb.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1931,6 +1932,44 @@ 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
+        (substitute-keyword-arguments (package-arguments lemonbar)
+          ((#:make-flags make-flags)
+           `(append ,make-flags
+              (list (string-append "CFLAGS="
+                      (string-join
+                        (list (string-append
+                                "-I" (assoc-ref %build-inputs "freetype")
+                                     "/include/freetype2")
+                              (string-append
+                                "-D" "VERSION="
+                                     (format #f "'~s'" ,version))))))))))
+      (synopsis (string-append (package-synopsis lemonbar)
+                               "-- with fontconfig support"))
+      (description (string-append (package-description lemonbar)
+                                  "  This is a fork of the @code{lemonbar}
+package that adds fontconfig support, for easier unicode usage.")))))
+
 (define-public xclickroot
   (let ((commit "309fd17174dba4149b5ea66654c6fd02cfcf7c9a")
         (revision "1"))
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#44789: gnu: Add lemonbar-xft.
  2020-12-09  6:53   ` elaexuotee--- via Guix-patches via
@ 2020-12-09  9:14     ` Christopher Baines
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2020-12-09  9:14 UTC (permalink / raw)
  To: elaexuotee; +Cc: 44789-done

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]


elaexuotee@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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-09  9:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-22  5:30 [bug#44789] gnu: Add lemonbar-xft elaexuotee--- via Guix-patches via
2020-11-28 16:46 ` Christopher Baines
2020-12-09  6:53   ` elaexuotee--- via Guix-patches via
2020-12-09  9:14     ` bug#44789: " Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.