unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Jacob Hrbek <kreyren@rixotstudio.cz>
Cc: guix-devel@gnu.org
Subject: Re: Unable to define shebang for guix shell file
Date: Wed, 17 Nov 2021 11:51:00 +0100	[thread overview]
Message-ID: <8735nvys17.fsf@gnu.org> (raw)
In-Reply-To: <krN7QJU4ixt207c3IOl0j_74-2xvEkIhRRGF4tEVjYI1b_ok16jxzcfxkLqvNICNF_l7-qcsBt1TyopaCd8l1_T_vLDH1mbE_7UIuvYskWA=@rixotstudio.cz> (Jacob Hrbek's message of "Tue, 09 Nov 2021 22:34:47 +0000")

Hi,

Jacob Hrbek <kreyren@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	other threads:[~2021-11-17 10:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-01  0:08 Unable to define shebang for guix shell file Jacob Hrbek
2021-11-09 17:21 ` Ludovic Courtès
2021-11-09 21:35   ` Jacob Hrbek
2021-11-09 22:14     ` Carlo Zancanaro
2021-11-09 22:34       ` Jacob Hrbek
2021-11-17 10:51         ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735nvys17.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=kreyren@rixotstudio.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).