all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: luhux <luhux@outlook.com>
To: 45130@debbugs.gnu.org
Subject: [bug#45130] [PATCH] gnu: Add mtm.
Date: Wed, 9 Dec 2020 01:33:49 +0000	[thread overview]
Message-ID: <PSXP216MB0214487C7C5BF4A7E39CEDBEA0CC0@PSXP216MB0214.KORP216.PROD.OUTLOOK.COM> (raw)


From 6f1a84e8b4feb3cc3c80095fe2aeec30d7862d9d Mon Sep 17 00:00:00 2001
From: luhux <luhux@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@member.fsf.org>
 ;;; Copyright © 2017 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 luhux <luhux@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





             reply	other threads:[~2020-12-09  1:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  1:33 luhux [this message]
2021-11-03 14:53 ` [bug#45130] [PATCH] gnu: Add mtm phodina via Guix-patches via
2021-11-06  9:33   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PSXP216MB0214487C7C5BF4A7E39CEDBEA0CC0@PSXP216MB0214.KORP216.PROD.OUTLOOK.COM \
    --to=luhux@outlook.com \
    --cc=45130@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.