From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: wrap-program =?utf-8?Q?=E2=80=93=3E?= wrap-script Date: Wed, 11 Dec 2019 16:57:41 +0100 Message-ID: <87h8263le2.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52461) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1if4N5-0004W4-8O for guix-devel@gnu.org; Wed, 11 Dec 2019 10:57:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1if4N4-0002pd-2X for guix-devel@gnu.org; Wed, 11 Dec 2019 10:57:51 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21168) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1if4N3-0002mm-Ko for guix-devel@gnu.org; Wed, 11 Dec 2019 10:57:50 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Hi Guix, I=E2=80=99ve just pushed a change to use wrap-script in one package. The purpose of wrap-script is to wrap an executable without having to create a separate wrapper shell script. It does this by prepending a Guile script to the top of the file, which sets the environment variables and then re-executes itself with the target interpreter (e.g. Python). I noticed two things: 1) wrap-script does not automatically pull in Guile as a dependency, so if Guile isn=E2=80=99t among the inputs it will create a bad shebang. This should be fixed on core-updates. 2) we aren=E2=80=99t using wrap-script anywhere. I think a good use case w= ould be the Python build system=E2=80=99s =E2=80=9Cwrap=E2=80=9D phase where we = currently use wrap-program. Most of the time we=E2=80=99d be dealing with Python scripts= , so using wrap-script would be more appropriate here. What do you think? -- Ricardo