On Guile 3, those procedures could be inlined, leading to
unbound-variable errors:
scheme@(guile-user)> ,bournish
Welcome to Bournish, a minimal Bourne-like shell!
To switch back, type `,L scheme'.
bournish@(guile-user)> ls
ice-9/boot-9.scm:1669:16: In procedure raise-exception:
Unbound variable: ls-command-implementation
Reported by Ricardo Wurmus.
* guix/build/bournish.scm (define-command-runtime): New macro.
(ls-command-implementation, wc-command-implementation)
(wc-l-command-implementation, wc-c-command-implementation): Use it
instead of 'define'.
Suggested by Ricardo Wurmus.
* guix/build/bournish.scm (ls-command-implementation): When FILE is a
directory, list its contents rather than FILE itself.
* guix/build/bournish.scm (%bournish-language): Add a joiner to SCHEME.
Compile only to Scheme.
* tests/bournish.scm: New file.
* Makefile.am (SCM_TESTS): Add it.
* guix/build/bournish.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/system/linux-initrd.scm (base-initrd): Add (guix build bournish)
and use it.