all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#51627] [PATCH] gnu: st: Compile and install terminfo files.
@ 2021-11-06  8:53 jgart via Guix-patches via
  2021-12-03 20:08 ` [bug#51627] (no subject) Raghav Gururajan via Guix-patches via
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jgart via Guix-patches via @ 2021-11-06  8:53 UTC (permalink / raw)
  To: 51627; +Cc: jgart

* gnu/packages/suckless.scm (st): Compile and install terminfo files.
[native-inputs]: ncurses's tic program is required to compile the
terminfo files.
---
 gnu/packages/suckless.scm | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b4855ec0a2..912ff12422 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -378,6 +378,9 @@ (define-public st
      `(#:tests? #f                      ; no tests
        #:make-flags
        (list (string-append "CC=" ,(cc-for-target))
+             (string-append "TERMINFO="
+                            (assoc-ref %outputs "out")
+                            "/share/terminfo")
              (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
@@ -385,15 +388,20 @@ (define-public st
          (add-after 'unpack 'inhibit-terminfo-install
            (lambda _
              (substitute* "Makefile"
-               (("\ttic .*") ""))
-             #t)))))
+               (("\ttic .*") ""))))
+         (add-after 'install 'compile-and-install-terminfo-entry
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out  (assoc-ref outputs "out"))
+                      (terminfo (string-append out "/share/terminfo")))
+                 (invoke "tic" "-sx" "st.info" "-o" terminfo)))))))
     (inputs
      `(("libx11" ,libx11)
        ("libxft" ,libxft)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("ncurses" ,ncurses)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://st.suckless.org/")
     (synopsis "Simple terminal emulator")
     (description
-- 
2.33.1





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

* [bug#51627] (no subject)
  2021-11-06  8:53 [bug#51627] [PATCH] gnu: st: Compile and install terminfo files jgart via Guix-patches via
@ 2021-12-03 20:08 ` Raghav Gururajan via Guix-patches via
  2021-12-03 20:21 ` [bug#51627] [PATCH v2] gnu: st: Install terminfo files jgart via Guix-patches via
  2021-12-03 20:37 ` bug#51627: (no subject) Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-03 20:08 UTC (permalink / raw)
  To: 51627; +Cc: jgart


[-- Attachment #1.1: Type: text/plain, Size: 87 bytes --]

Hi Jorge!

As discussed over XMPP, could you sent a revised patch?

Regards,
RG.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

* [bug#51627] [PATCH v2] gnu: st: Install terminfo files.
  2021-11-06  8:53 [bug#51627] [PATCH] gnu: st: Compile and install terminfo files jgart via Guix-patches via
  2021-12-03 20:08 ` [bug#51627] (no subject) Raghav Gururajan via Guix-patches via
@ 2021-12-03 20:21 ` jgart via Guix-patches via
  2021-12-03 20:37 ` bug#51627: (no subject) Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: jgart via Guix-patches via @ 2021-12-03 20:21 UTC (permalink / raw)
  To: 51627; +Cc: jgart

Here is version two of the patch set that adds ncurses to the native-input.

The Makefile already takes care of compiling the terminfo files as long as the
tic binary is available. The tic binary comes from the ncurse package.

* gnu/packages/suckless.scm (st)[native-inputs]: Add ncurses.
[configure-flags](TERMINFO): New flag.
[phases](inhibit-terminfo-install): Remove phase.
---
 gnu/packages/suckless.scm | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b4855ec0a2..fcebe894a7 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -378,22 +378,15 @@ (define-public st
      `(#:tests? #f                      ; no tests
        #:make-flags
        (list (string-append "CC=" ,(cc-for-target))
-             (string-append "PREFIX=" %output))
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure)
-         (add-after 'unpack 'inhibit-terminfo-install
-           (lambda _
-             (substitute* "Makefile"
-               (("\ttic .*") ""))
-             #t)))))
+             (string-append "PREFIX=" %output))))
     (inputs
      `(("libx11" ,libx11)
        ("libxft" ,libxft)
        ("fontconfig" ,fontconfig)
        ("freetype" ,freetype)))
     (native-inputs
-     `(("pkg-config" ,pkg-config)))
+     `(("ncurses" ,ncurses)
+       ("pkg-config" ,pkg-config)))
     (home-page "https://st.suckless.org/")
     (synopsis "Simple terminal emulator")
     (description
-- 
2.34.0





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

* bug#51627: (no subject)
  2021-11-06  8:53 [bug#51627] [PATCH] gnu: st: Compile and install terminfo files jgart via Guix-patches via
  2021-12-03 20:08 ` [bug#51627] (no subject) Raghav Gururajan via Guix-patches via
  2021-12-03 20:21 ` [bug#51627] [PATCH v2] gnu: st: Install terminfo files jgart via Guix-patches via
@ 2021-12-03 20:37 ` Raghav Gururajan via Guix-patches via
  2 siblings, 0 replies; 4+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-12-03 20:37 UTC (permalink / raw)
  To: 51627-done; +Cc: jgart


[-- Attachment #1.1: Type: text/plain, Size: 90 bytes --]

Pushed to master as 170cb4c881..19528e39bb, with new make-flag. Thanks!

Regards,
RG.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

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

end of thread, other threads:[~2021-12-03 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06  8:53 [bug#51627] [PATCH] gnu: st: Compile and install terminfo files jgart via Guix-patches via
2021-12-03 20:08 ` [bug#51627] (no subject) Raghav Gururajan via Guix-patches via
2021-12-03 20:21 ` [bug#51627] [PATCH v2] gnu: st: Install terminfo files jgart via Guix-patches via
2021-12-03 20:37 ` bug#51627: (no subject) Raghav Gururajan via Guix-patches via

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.