unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26984: Add loksh (ported OpenBSD pdksh)
@ 2017-05-18 18:20 ng0
  2017-05-18 20:22 ` ng0
       [not found] ` <handler.26984.D26984.149524097422781.notifdone@debbugs.gnu.org>
  0 siblings, 2 replies; 4+ messages in thread
From: ng0 @ 2017-05-18 18:20 UTC (permalink / raw)
  To: 26984

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

The first patch adds loksh, a port of OpenBSD pdksh to Linux userland.
Intended for musl build, but we don't have that now.
It seems to work, I use it.
-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/

[-- Attachment #2: 0001-gnu-Add-loksh.patch --]
[-- Type: text/plain, Size: 2428 bytes --]

From b72f88bfa8c3f26fcac4a0c0e9ef07a76e727fcf Mon Sep 17 00:00:00 2001
From: ng0 <ng0@no-reply.pragmatique.xyz>
Date: Thu, 18 May 2017 16:55:12 +0000
Subject: [PATCH] gnu: Add loksh.

* gnu/packages/shells.scm (loksh): New variable.
---
 gnu/packages/shells.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 4e684e8c8..5035c935a 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -32,6 +32,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages groff)
+  #:use-module (gnu packages libbsd)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages pcre)
@@ -457,3 +458,39 @@ 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 loksh
+  (package
+    (name "loksh")
+    (version "6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/dimkr/loksh/archive/"
+                           version ".tar.gz"))
+       (file-name (string-append name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1wg7ds56yr8fgg1m149bi53bvrwccwiashmwknggza1sqgj9m2lq"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libbsd" ,libbsd)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:tests? #f ;No tests included
+       #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
+                          (string-append "DESTDIR="
+                                         (assoc-ref %outputs "out"))
+                          "PREFIX=")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)))) ;No configure script
+    (home-page "https://github.com/dimkr/loksh")
+    (synopsis "Port of OpenBSD pdksh to Linux")
+    (description
+     "loksh is a Linux port of OpenBSD's ksh (pdksh).
+It is a small, interactive shell targeted at resource-constrained systems.")
+    ;; The file 'LEGAL' says it is the public domain, and the 2
+    ;; exceptions which are listed are not included in this port.
+    (license public-domain)))
-- 
2.13.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#26984: Add loksh (ported OpenBSD pdksh)
  2017-05-18 18:20 bug#26984: Add loksh (ported OpenBSD pdksh) ng0
@ 2017-05-18 20:22 ` ng0
  2017-05-20  0:42   ` Marius Bakke
       [not found] ` <handler.26984.D26984.149524097422781.notifdone@debbugs.gnu.org>
  1 sibling, 1 reply; 4+ messages in thread
From: ng0 @ 2017-05-18 20:22 UTC (permalink / raw)
  To: 26984

ng0 transcribed 2.8K bytes:
> The first patch adds loksh, a port of OpenBSD pdksh to Linux userland.
> Intended for musl build, but we don't have that now.
> It seems to work, I use it.

By the way, this can not be used for the test suite in graphviz.
There are many ksh implementations, and this is not the one
the tests accept. Or at least its ksh93 checks fail ;)

> -- 
> https://pragmatique.xyz
> PGP: https://people.pragmatique.xyz/ng0/

> From b72f88bfa8c3f26fcac4a0c0e9ef07a76e727fcf Mon Sep 17 00:00:00 2001
> From: ng0 <ng0@no-reply.pragmatique.xyz>
> Date: Thu, 18 May 2017 16:55:12 +0000
> Subject: [PATCH] gnu: Add loksh.
> 
> * gnu/packages/shells.scm (loksh): New variable.
> ---
>  gnu/packages/shells.scm | 37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
> 
> diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
> index 4e684e8c8..5035c935a 100644
> --- a/gnu/packages/shells.scm
> +++ b/gnu/packages/shells.scm
> @@ -32,6 +32,7 @@
>    #:use-module (gnu packages bison)
>    #:use-module (gnu packages documentation)
>    #:use-module (gnu packages groff)
> +  #:use-module (gnu packages libbsd)
>    #:use-module (gnu packages libedit)
>    #:use-module (gnu packages ncurses)
>    #:use-module (gnu packages pcre)
> @@ -457,3 +458,39 @@ 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 loksh
> +  (package
> +    (name "loksh")
> +    (version "6.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "https://github.com/dimkr/loksh/archive/"
> +                           version ".tar.gz"))
> +       (file-name (string-append name "-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "1wg7ds56yr8fgg1m149bi53bvrwccwiashmwknggza1sqgj9m2lq"))))
> +    (build-system gnu-build-system)
> +    (inputs
> +     `(("libbsd" ,libbsd)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)))
> +    (arguments
> +     `(#:tests? #f ;No tests included
> +       #:make-flags (list "CC=gcc" "HAVE_LIBBSD=1"
> +                          (string-append "DESTDIR="
> +                                         (assoc-ref %outputs "out"))
> +                          "PREFIX=")
> +       #:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)))) ;No configure script
> +    (home-page "https://github.com/dimkr/loksh")
> +    (synopsis "Port of OpenBSD pdksh to Linux")
> +    (description
> +     "loksh is a Linux port of OpenBSD's ksh (pdksh).
> +It is a small, interactive shell targeted at resource-constrained systems.")
> +    ;; The file 'LEGAL' says it is the public domain, and the 2
> +    ;; exceptions which are listed are not included in this port.
> +    (license public-domain)))
> -- 
> 2.13.0
> 


-- 
https://pragmatique.xyz
PGP: https://people.pragmatique.xyz/ng0/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26984: Add loksh (ported OpenBSD pdksh)
  2017-05-18 20:22 ` ng0
@ 2017-05-20  0:42   ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2017-05-20  0:42 UTC (permalink / raw)
  To: ng0, 26984-done

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

ng0 <ng0@pragmatique.xyz> writes:

> Subject: [PATCH] gnu: Add loksh.
>
> * gnu/packages/shells.scm (loksh): New variable.

Thanks for this patch! I've used this shell a lot on OpenBSD. One
thing it does better than bash is that ^W stops at "/" and other
boundaries, not just spaces!

I've applied it with a slight adjustment to description:

diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm
index 5035c935a..47d3a4614 100644
--- a/gnu/packages/shells.scm
+++ b/gnu/packages/shells.scm
@@ -487,10 +487,10 @@ operating system.")
        (modify-phases %standard-phases
          (delete 'configure)))) ;No configure script
     (home-page "https://github.com/dimkr/loksh")
-    (synopsis "Port of OpenBSD pdksh to Linux")
+    (synopsis "Korn Shell from OpenBSD")
     (description
-     "loksh is a Linux port of OpenBSD's ksh (pdksh).
-It is a small, interactive shell targeted at resource-constrained systems.")
+     "loksh is a Linux port of OpenBSD's @command{ksh}.  It is a small,
+interactive POSIX shell targeted at resource-constrained systems.")
     ;; The file 'LEGAL' says it is the public domain, and the 2
     ;; exceptions which are listed are not included in this port.
     (license public-domain)))

> By the way, this can not be used for the test suite in graphviz.
> There are many ksh implementations, and this is not the one
> the tests accept. Or at least its ksh93 checks fail ;)

Maybe they need "mksh"? Another popular Korn Shell :)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* bug#26984: closed (Re: bug#26984: Add loksh (ported OpenBSD pdksh))
       [not found] ` <handler.26984.D26984.149524097422781.notifdone@debbugs.gnu.org>
@ 2017-05-20  9:19   ` user
  0 siblings, 0 replies; 4+ messages in thread
From: user @ 2017-05-20  9:19 UTC (permalink / raw)
  To: mbakke; +Cc: 26984

help-debbugs@gnu.org (GNU bug Tracking System) writes:

> ng0 <ng0@pragmatique.xyz> writes:
>
>> Subject: [PATCH] gnu: Add loksh.
>>
>> * gnu/packages/shells.scm (loksh): New variable.
>
> Thanks for this patch! I've used this shell a lot on OpenBSD. One
> thing it does better than bash is that ^W stops at "/" and other
> boundaries, not just spaces!
>
> I've applied it with a slight adjustment to description:

>> By the way, this can not be used for the test suite in graphviz.
>> There are many ksh implementations, and this is not the one
>> the tests accept. Or at least its ksh93 checks fail ;)
>
> Maybe they need "mksh"? Another popular Korn Shell :)

Maybe. It must be a ksh93 implementation, most implementations
are ksh88. I don't know enough about ksh to know if a shell
is compatible. I executed ksh and ran the lines which test for
ksh88 or ksh93. It failed.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-20 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18 18:20 bug#26984: Add loksh (ported OpenBSD pdksh) ng0
2017-05-18 20:22 ` ng0
2017-05-20  0:42   ` Marius Bakke
     [not found] ` <handler.26984.D26984.149524097422781.notifdone@debbugs.gnu.org>
2017-05-20  9:19   ` bug#26984: closed (Re: bug#26984: Add loksh (ported OpenBSD pdksh)) user

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).