From 662892f68cfdce43629e304e8abdf46ae2f7557b Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 16 May 2017 22:28:57 +0000 Subject: [PATCH 1/2] gnu: Add linenoise. * gnu/packages/shells.scm (linenoise): New variable. --- gnu/packages/shells.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 4e684e8c8..714b8f291 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -457,3 +457,47 @@ components: a process notation for running programs and setting up pipelines 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: + address@hidden address@hidden Single and multi line editing mode with the usual key bindings address@hidden History handling address@hidden Completion address@hidden Hints (suggestions at the right of the prompt as you type) address@hidden A subset of VT100 escapes, ANSI.SYS compatible address@hidden enumerate\n") + (license bsd-4))) -- 2.13.0