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

Signed-off-by: Kei Kebreau <kei@openmailbox.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/shells.scm61
1 files changed, 61 insertions, 0 deletions
diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 5eeb186c4b..5e04e86539 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -503,6 +503,67 @@ Its features include:
 @end enumerate\n")
     (license bsd-2)))
 
+(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=gcc")
+         #: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/linenoise"))
+                      (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 multiple
+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 @code{andglob} program is also provided along with s.")
+      (license bsd-3))))
+
 (define-public loksh
   (package
     (name "loksh")