GNU bug report logs - #45130
[PATCH] gnu: Add mtm.

Previous Next

Package: guix-patches;

Reported by: luhux <luhux <at> outlook.com>

Date: Wed, 9 Dec 2020 01:50:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

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 45130 in the body.
You can then email your comments to 45130 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#45130; Package guix-patches. (Wed, 09 Dec 2020 01:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to luhux <luhux <at> outlook.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 09 Dec 2020 01:50:02 GMT) Full text and rfc822 format available.

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

From: luhux <luhux <at> outlook.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add mtm.
Date: Wed, 9 Dec 2020 01:33:49 +0000
From 6f1a84e8b4feb3cc3c80095fe2aeec30d7862d9d Mon Sep 17 00:00:00 2001
From: luhux <luhux <at> outlook.com>
Date: Wed, 9 Dec 2020 00:47:03 +0000
Subject: [PATCH] gnu: Add mtm.

* gnu/packages/suckless.scm (mtm): New variable.
---
 gnu/packages/suckless.scm | 61 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 7e297eb9ae..00f90a36ff 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2017 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2020 luhux <luhux <at> outlook.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -766,3 +767,63 @@ chat output in the background.")
 Single daemon and configuration file.  Log to stdout or syslog.  No mail
 support.")
     (license license:expat)))
+
+(define-public mtm
+  (let ((commit "cabd8704b9299d8b354ec8b403a6041bbddd2191")
+        (revision "0"))
+    (package
+      (name "mtm")
+      (version (git-version "1.2.0" revision commit))
+      (source
+       (origin
+         (uri (git-reference
+               (url "https://github.com/deadpixi/mtm")
+               (commit commit)))
+         (method git-fetch)
+         (sha256
+          (base32 "08crai3wxa6npd27y6qd290mj55l0bk8ibm4agyb002kbga8vkc7"))
+         (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("ncurses" ,ncurses)))
+      (arguments
+       `(#:tests? #f ; no tests
+         #:make-flags
+         (list (string-append "CC=" ,(cc-for-target))
+               (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+         #:phases
+         (modify-phases %standard-phases
+           (add-before 'build 'fix-headers
+               (lambda _
+                 (substitute* "config.def.h"
+                   (("ncursesw/curses.h")
+                    "curses.h"))))
+           (replace 'install
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out")))
+                 ;; install binary
+                 (mkdir-p (string-append out "bin/"))
+                 (install-file "mtm" (string-append out "/bin"))
+                 ;; install manpage
+                 (mkdir-p (string-append out "share/man/man1"))
+                 (install-file "mtm.1" (string-append out "/share/man/man1"))
+                 ;; install terminfo
+                 (mkdir-p (string-append out "share/terminfo"))
+                 (invoke (string-append (assoc-ref inputs "ncurses") "/bin/tic")
+                         "-x" "-s" "-o"
+                         (string-append
+                          out "/share/terminfo")
+                         "mtm.ti"))
+               #t))
+           (delete 'configure))))
+      ;; FIXME: This should only be located in 'ncurses'.  Nonetheless it is
+      ;; provided for usability reasons.  See <https://bugs.gnu.org/22138>.
+      (native-search-paths
+       (list (search-path-specification
+              (variable "TERMINFO_DIRS")
+              (files '("share/terminfo")))))
+      (synopsis "Micro Terminal Multiplexer")
+      (description
+       "Micro Terminal Multiplexer")
+      (license license:gpl3+)
+      (home-page "https://github.com/deadpixi/mtm"))))
-- 
2.29.2





Information forwarded to guix-patches <at> gnu.org:
bug#45130; Package guix-patches. (Wed, 03 Nov 2021 14:54:01 GMT) Full text and rfc822 format available.

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

From: phodina <phodina <at> protonmail.com>
To: "45130 <at> debbugs.gnu.org" <45130 <at> debbugs.gnu.org>
Subject: RE: [PATCH] gnu: Add mtm.
Date: Wed, 03 Nov 2021 14:53:00 +0000
Hi,

here's updated version of the patch where the version uses newest tag instead of commit. Otherwise LGTM.

--8<---------------cut here---------------start------------->8---

Subject: [PATCH v2] gnu: Add mtm.

* gnu/packages/suckless.scm (mtm): New variable.

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index b4855ec0a2..0e21af24e5 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Eric Bavier <bavier <at> member.fsf.org>
 ;;; Copyright © 2017 Alex Griffin <a <at> ajgrf.com>
 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright @ 2020 luhux <luhux <at> outlook.com>
 ;;; Copyright © 2021 Raghav Gururajan <rg <at> raghavgururajan.name>
 ;;; Copyright © 2021 Alexandru-Sergiu Marton <brown121407 <at> posteo.ro>
 ;;;
@@ -700,6 +701,65 @@ (define-public noice
      "Noice is a small curses-based file browser.")
     (license license:bsd-2)))

+(define-public mtm
+  (package
+    (name "mtm")
+    (version "1.2.1")
+    (source
+     (origin
+       (uri (git-reference
+             (url "https://github.com/deadpixi/mtm")
+             (commit version)))
+       (method git-fetch)
+       (sha256
+        (base32 "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-headers
+           (lambda _
+             (substitute* "config.def.h"
+               (("ncursesw/curses.h")
+                "curses.h"))))
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               ;; install binary
+               (mkdir-p (string-append out "bin/"))
+               (install-file "mtm" (string-append out "/bin"))
+               ;; install manpage
+               (mkdir-p (string-append out "share/man/man1"))
+               (install-file "mtm.1" (string-append out "/share/man/man1"))
+               ;; install terminfo
+               (mkdir-p (string-append out "share/terminfo"))
+               (invoke (string-append (assoc-ref inputs "ncurses") "/bin/tic")
+                       "-x" "-s" "-o"
+                       (string-append
+                        out "/share/terminfo")
+                       "mtm.ti"))
+             #t))
+         (delete 'configure))))
+    ;; FIXME: This should only be located in 'ncurses'.  Nonetheless it is
+    ;; provided for usability reasons.  See <https://bugs.gnu.org/22138>.
+    (native-search-paths
+     (list (search-path-specification
+            (variable "TERMINFO_DIRS")
+            (files '("share/terminfo")))))
+    (synopsis "Micro Terminal Multiplexer")
+    (description
+     "This package provides multiplexer for the terminal focused on simplicity,
+compatibility, size and stability.")
+    (license license:gpl3+)
+    (home-page "https://github.com/deadpixi/mtm")))
+
 (define-public human
   (package
     (name "human")
--
2.33.1




Information forwarded to guix-patches <at> gnu.org:
bug#45130; Package guix-patches. (Sat, 06 Nov 2021 09:34:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: phodina via Guix-patches via <guix-patches <at> gnu.org>
Cc: "45130 <at> debbugs.gnu.org" <45130 <at> debbugs.gnu.org>,
 phodina <phodina <at> protonmail.com>
Subject: Re: [bug#45130] [PATCH] gnu: Add mtm.
Date: Sat, 06 Nov 2021 10:33:17 +0100
Hello,

phodina via Guix-patches via <guix-patches <at> gnu.org> writes:

> here's updated version of the patch where the version uses newest tag
> instead of commit. Otherwise LGTM.

Is there any reason to put the variable in suckless.scm?

> +         (replace 'install
> +           (lambda* (#:key inputs outputs #:allow-other-keys)
> +             (let* ((out (assoc-ref outputs "out")))
> +               ;; install binary
> +               (mkdir-p (string-append out "bin/"))
> +               (install-file "mtm" (string-append out "/bin"))
> +               ;; install manpage
> +               (mkdir-p (string-append out "share/man/man1"))
> +               (install-file "mtm.1" (string-append out "/share/man/man1"))
> +               ;; install terminfo
> +               (mkdir-p (string-append out "share/terminfo"))
> +               (invoke (string-append (assoc-ref inputs "ncurses") "/bin/tic")
> +                       "-x" "-s" "-o"
> +                       (string-append
> +                        out "/share/terminfo")
> +                       "mtm.ti"))
> +             #t))

We can remove the trailing #t.

> +         (delete 'configure))))

There's probably a missing comment "no configure script"

> +    ;; FIXME: This should only be located in 'ncurses'.  Nonetheless it is
> +    ;; provided for usability reasons.  See <https://bugs.gnu.org/22138>.
> +    (native-search-paths
> +     (list (search-path-specification
> +            (variable "TERMINFO_DIRS")
> +            (files '("share/terminfo")))))
> +    (synopsis "Micro Terminal Multiplexer")
> +    (description
> +     "This package provides multiplexer for the terminal focused on simplicity,
> +compatibility, size and stability.")
> +    (license license:gpl3+)
> +    (home-page "https://github.com/deadpixi/mtm")))

Nitpick: the home-page field is usually above the synopsis.

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#45130; Package guix-patches. (Sat, 06 Nov 2021 09:34:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#45130; Package guix-patches. (Wed, 10 Nov 2021 13:43:02 GMT) Full text and rfc822 format available.

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

From: phodina <phodina <at> protonmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: "45130 <at> debbugs.gnu.org" <45130 <at> debbugs.gnu.org>,
 phodina via Guix-patches via <guix-patches <at> gnu.org>
Subject: [PATCH v2] gnu: Add mtm.
Date: Wed, 10 Nov 2021 13:41:57 +0000
Hi Nicolas,

here's updated patch. The mtm package is placed in terminals.scm with the suggestions you mentioned above.

---
Kind regards
Petr

* gnu/packages/terminals.scm (mtm): New variable.

diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm
index 8d751f6cce..b2c214275e 100644
--- a/gnu/packages/terminals.scm
+++ b/gnu/packages/terminals.scm
@@ -23,11 +23,13 @@
 ;;; Copyright © 2020, 2021 Marius Bakke <marius <at> gnu.org>
 ;;; Copyright © 2020, 2021 Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
 ;;; Copyright © 2020 Leo Famulari <leo <at> famulari.name>
+;;; Copyright @ 2020 luhux <luhux <at> outlook.com>
 ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz <at> elenq.tech>
 ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte <at> mind.be>
 ;;; Copyright © 2021 ikasero <ahmed <at> ikasero.com>
 ;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
 ;;; Copyright © 2021 Solene Rapenne <solene <at> perso.pw>
+;;; Copyright © 2021 Petr Hodina <phodina <at> protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -424,6 +426,64 @@ (define-public mlterm
 Vietnamese, and bi-directional scripts like Arabic and Hebrew.")
     (license license:bsd-3)))

+(define-public mtm
+  (package
+    (name "mtm")
+    (version "1.2.1")
+    (source
+     (origin
+       (uri (git-reference
+             (url "https://github.com/deadpixi/mtm")
+             (commit version)))
+       (method git-fetch)
+       (sha256
+        (base32 "0gibrvah059z37jvn1qs4b6kvd4ivk2mfihmcpgx1vz6yg70zghv"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("ncurses" ,ncurses)))
+    (arguments
+     `(#:tests? #f                      ; no tests
+       #:make-flags
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "DESTDIR=" (assoc-ref %outputs "out")))
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-headers
+           (lambda _
+             (substitute* "config.def.h"
+               (("ncursesw/curses.h")
+                "curses.h"))))
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out")))
+               ;; install binary
+               (mkdir-p (string-append out "bin/"))
+               (install-file "mtm" (string-append out "/bin"))
+               ;; install manpage
+               (mkdir-p (string-append out "share/man/man1"))
+               (install-file "mtm.1" (string-append out "/share/man/man1"))
+               ;; install terminfo
+               (mkdir-p (string-append out "share/terminfo"))
+               (invoke (string-append (assoc-ref inputs "ncurses") "/bin/tic")
+                       "-x" "-s" "-o"
+                       (string-append
+                        out "/share/terminfo")
+                       "mtm.ti"))))
+         (delete 'configure))))         ; no configure script
+    ;; FIXME: This should only be located in 'ncurses'.  Nonetheless it is
+    ;; provided for usability reasons.  See <https://bugs.gnu.org/22138>.
+    (native-search-paths
+     (list (search-path-specification
+            (variable "TERMINFO_DIRS")
+            (files '("share/terminfo")))))
+    (home-page "https://github.com/deadpixi/mtm")
+    (synopsis "Micro Terminal Multiplexer")
+    (description
+     "This package provides multiplexer for the terminal focused on simplicity,
+compatibility, size and stability.")
+    (license license:gpl3+)))
+
 (define-public picocom
   (package
     (name "picocom")
--
2.33.1




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 15 Nov 2021 10:29:02 GMT) Full text and rfc822 format available.

Notification sent to luhux <luhux <at> outlook.com>:
bug acknowledged by developer. (Mon, 15 Nov 2021 10:29:02 GMT) Full text and rfc822 format available.

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

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: phodina via Guix-patches via <guix-patches <at> gnu.org>
Cc: 45130-done <at> debbugs.gnu.org, phodina <phodina <at> protonmail.com>,
 51752-done <at> debbugs.gnu.org
Subject: Re: [bug#51752] [PATCH v2] gnu: Add mtm.
Date: Mon, 15 Nov 2021 11:27:58 +0100
Hello,

phodina via Guix-patches via <guix-patches <at> gnu.org> writes:

> here's updated patch. The mtm package is placed in terminals.scm with
> the suggestions you mentioned above.

Thank you. I applied it with the minor modifications below.
> +    (build-system gnu-build-system)
> +    (inputs
> +     `(("ncurses" ,ncurses)))

I moved inputs field after arguments.

> +    (license license:gpl3+)))

I added bsd-3 for vtparser.c

Regards,
-- 
Nicolas Goaziou




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

This bug report was last modified 2 years and 96 days ago.

Previous Next


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