Hi,

Jacob Hrbek <krey...@rixotstudio.cz> skribis:

> Doesn't seem to work on `busybox sh` for me (I am not aware of better way to 
> replicate POSIX environment on GNU Guix):

Note that you’re running /usr/bin/env, which has nothing to do with
Busybox.

> kreyren@leonid ~$ guix shell busybox -- busybox sh
> ...
> ~ $ cat test.sh 
>
> #!/usr/bin/env -S guix shell --
> (use-modules
>       (guix channels))
>
> (list (channel
>         (name 'guix)
>         (url "https://git.savannah.gnu.org/git/guix.git";)
>         (commit
>           "f1bfd9f1948a5ff336d737c0614b9a30c2bb3097")
>         (introduction
>           (make-channel-introduction
>             "9edb3f66fd807b096b48283debdcddccfea34bad"
>             (openpgp-fingerprint
>               "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
>
> (specifications->manifest
>       (list "emacs@27.2"
>               "emacs-treemacs"
>               "emacs-evil"))
> ~ $ ./test.sh 
>
> guix shell: warning: no packages specified; creating an empty environment
> guix shell: warning: no packages specified; creating an empty environment

It’s working as expected: ‘guix shell’ has zero arguments so it creates
an empty environment.  Additionally, the shebang does not specify an
interpreter.

The example I gave at <https://issues.guix.gnu.org/50960#22> goes like
this:

--8<---------------cut here---------------start------------->8---
$ cat t.sh
#!/usr/bin/env -S guix shell hello bash -- sh
type -P hello
hello
--8<---------------cut here---------------end--------------->8---

HTH!

Ludo’.

Reply via email to