summary refs log tree commit diff
path: root/gnu/packages/shells.scm
diff options
context:
space:
mode:
authorng0 <ng0@no-reply.pragmatique.xyz>2017-05-16 22:28:57 +0000
committerKei Kebreau <kei@openmailbox.org>2017-06-04 10:45:06 -0400
commit17cf788ffa875e5315a1420e63e91658dae1c23a (patch)
treef0c1fdf078c56d6ef230cd4299578195bbbfff2a /gnu/packages/shells.scm
parent543c5f3fdaf64f3f150a23471454776c8c8dab2f (diff)
downloadguix-17cf788ffa875e5315a1420e63e91658dae1c23a.tar.gz
gnu: Add linenoise.
* gnu/packages/shells.scm (linenoise): New variable.

Signed-off-by: Kei Kebreau <kei@openmailbox.org>
Diffstat (limited to 'gnu/packages/shells.scm')
-rw-r--r--gnu/packages/shells.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 47d3a46148..5eeb186c4b 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -459,6 +459,50 @@ and redirections, and a complete syscall library for low-level access to the
 operating system.")
       (license bsd-3))))
 
+(define-public linenoise
+  (package
+    (name "linenoise")
+    (version "1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/antirez/linenoise/"
+                           "archive/" version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "05006hd56xcvxjdpll4x720bpfan7vwqmxbw8a2kvm10w57ll1gm"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ;No tests are included
+       #:make-flags (list "CC=gcc")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; At the moment there is no 'make install' in upstream.
+             (let* ((out (assoc-ref outputs "out")))
+               (install-file "linenoise.h"
+                             (string-append out "/include/linenoise"))
+               (install-file "linenoise.c"
+                             (string-append out "/include/linenoise"))
+               #t))))))
+    (home-page "https://github.com/antirez/linenoise")
+    (synopsis "Minimal zero-config readline replacement")
+    (description
+     "Linenoise is a minimal, zero-config, readline replacement.
+Its features include:
+
+@enumerate
+@item Single and multi line editing mode with the usual key bindings
+@item History handling
+@item Completion
+@item Hints (suggestions at the right of the prompt as you type)
+@item A subset of VT100 escapes, ANSI.SYS compatible
+@end enumerate\n")
+    (license bsd-2)))
+
 (define-public loksh
   (package
     (name "loksh")