From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAzFG-0007ki-8C for guix-patches@gnu.org; Wed, 17 May 2017 09:44:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAzFD-00059y-3p for guix-patches@gnu.org; Wed, 17 May 2017 09:44:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:47107) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dAzFC-00059t-WE for guix-patches@gnu.org; Wed, 17 May 2017 09:44:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dAzFC-0005Qo-H3 for guix-patches@gnu.org; Wed, 17 May 2017 09:44:02 -0400 Subject: bug#26962: A shell: s Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59385) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dAzE4-0006mX-CP for guix-patches@gnu.org; Wed, 17 May 2017 09:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dAzE1-0004S4-7p for guix-patches@gnu.org; Wed, 17 May 2017 09:42:52 -0400 Received: from 93-95-228-241.1984.is ([93.95.228.241]:48790 helo=sharknado9001.pragmatique.xyz) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dAzE0-0004Rw-Py for guix-patches@gnu.org; Wed, 17 May 2017 09:42:49 -0400 Received: by sharknado9001.pragmatique.xyz (OpenSMTPD) with ESMTPSA id 36de5b70 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Wed, 17 May 2017 13:42:34 +0000 (UTC) Date: Wed, 17 May 2017 13:42:41 +0000 From: ng0 Message-ID: <20170517134241.c6kqu3khheefqokw@abyayala> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="rnh3gglyuw4kpf64" Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26962@debbugs.gnu.org --rnh3gglyuw4kpf64 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline This adds the shell s(1) and the selfcontained linenoise, a readline replacement. --rnh3gglyuw4kpf64 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0001-gnu-Add-linenoise.patch" Content-Transfer-Encoding: quoted-printable =46rom 662892f68cfdce43629e304e8abdf46ae2f7557b Mon Sep 17 00:00:00 2001 =46rom: 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 an= d setting up pipelines and redirections, and a complete syscall library for low-level access to t= he 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=3Dgcc") + #: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-4))) --=20 2.13.0 --rnh3gglyuw4kpf64 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="0002-gnu-Add-s.patch" Content-Transfer-Encoding: quoted-printable =46rom f36ada5fa95ca2d1d01a75b507295c97b7a2419b Mon Sep 17 00:00:00 2001 =46rom: ng0 Date: Tue, 16 May 2017 22:28:58 +0000 Subject: [PATCH 2/2] gnu: Add s. * gnu/packages/shells.scm (s): New variable. --- gnu/packages/shells.scm | 61 +++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 61 insertions(+) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 714b8f291..fbfc45626 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -501,3 +501,64 @@ Its features include: @item A subset of VT100 escapes, ANSI.SYS compatible @end enumerate\n") (license bsd-4))) + +(define-public s + (let ((commit "6604341edb3a775ff94415762af3ee9bd86bfb3c") + (revision "1")) + (package + (name "s") + (version (string-append "0.0.0-" revision "." (string-take commit 7)= )) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rain-1/s") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "1075cml6dl15d770j3m12yz90cjacsdslbv3gank1nxd76vmpdcr")))) + (build-system gnu-build-system) + (inputs + `(("linenoise" ,linenoise))) + (arguments + `(#:tests? #f + #:make-flags (list "CC=3Dgcc") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'install-directory-fix + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (substitute* "Makefile" + (("out") bin)) + #t))) + (add-after 'install 'manpage + (lambda* (#:key outputs #:allow-other-keys) + (install-file "s.1" (string-append (assoc-ref outputs "out") + "/share/man/man1")))) + (replace 'configure + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; At this point linenoise is meant to be included, + ;; so we have to really copy it into the working directory + ;; of s. + (let* ((linenoise (assoc-ref inputs "linenoise")) + (noisepath (string-append linenoise "/include/lineno= ise")) + (out (assoc-ref outputs "out"))) + (copy-recursively noisepath "linenoise") + (substitute* "s.c" + (("/bin/s") (string-append out "/bin/s"))) + #t)))))) + (home-page "https://github.com/rain-1/s") + (synopsis "Extremely minimal shell with the simplest syntax possible= ") + (description + "S is a new shell that aims to be extremely simple. +S does not implemnt the POSIX shell standard. +There are no globs or \"splatting\" where a variable $FOO turns into multi= ple +command line arguments. One token stays one token forever. +This is a \"no surprises\" straightforward approach. + +There are no redirection operators > in the shell language, they are +added as extra programs. > is just another unix command, < is essentially +cat(1). A andglob program is also provided along with s.") + (license bsd-3)))) --=20 2.13.0 --rnh3gglyuw4kpf64--