From mboxrd@z Thu Jan 1 00:00:00 1970 From: EuAndreh via Subject: Re: guix environment shebang interpreter Date: Thu, 13 Feb 2020 12:43:45 -0300 Message-ID: <878sl6ze4u.fsf@euandre.org> References: <877e1lwubl.fsf@euandre.org> <9eff6bf44ddeebf488e6482a53cc0466@posteo.de> Reply-To: EuAndreh Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49220) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2GuV-0001ru-7O for Help-Guix@gnu.org; Thu, 13 Feb 2020 11:00:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2GuU-0006KT-40 for Help-Guix@gnu.org; Thu, 13 Feb 2020 11:00:15 -0500 In-Reply-To: <9eff6bf44ddeebf488e6482a53cc0466@posteo.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: mlell@posteo.de Cc: help-guix , Help-Guix mlell@posteo.de writes: > But, one answer there has a possible solution for you: > https://unix.stackexchange.com/a/399698 > > --8<------------------------------------------------------- > #!/bin/sh - > > if [ "$1" != "--really" ]; then exec bash --posix -- "$0" --really "$@"; > fi > > shift > > # Processing continues > ----------------------------------------------->8----------- > > It lets the script `exec` itself with the right arguments! So maybe put > > exec guix environment --ad-hoc PKG1 PKG2 ... -- INTERPRETER "$0" > "$@" > > there? Hmm, I guess that works. It's a bit ugly but does the job. Thanks for the link. I also just wanted to check for the existance of such functionality in Guix already, before pursuing alternatives. Thanks Moritz :)