guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#50960] ‘guix shell’ shebangs


From: Katherine Cox-Buday
Subject: [bug#50960] ‘guix shell’ shebangs
Date: Sun, 03 Oct 2021 17:50:19 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Ludovic Courtès <ludo@gnu.org> writes:

> Oh, I had another goal in mind, which was to make it easy to use ‘guix
> shell’ in shebangs.
>
> Problem is, since it’s called ‘guix shell’ and not ‘guix-shell’, we have
> to use ‘/usr/bin/env -S’ anyway as the shebang so it splits arguments.
> And with ‘-S’, we can already do pretty much everything we want.  Here’s
> a shell script:
>
> --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---

I was already very excited about this patch series, and now I see this!

I wanted to point out that I don't think Guix's shebang substitution phases 
know how to deal with ~env -S~, and I wish they would (I recently ran into 
this). I can't really think of any use-cases for a Guix package which when 
built contains a ~guix shell~ script, but I wanted to raise the possibility in 
case someone else can.

-- 
Katherine





reply via email to

[Prev in Thread] Current Thread [Next in Thread]