From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CHUaE8n3imFBZwAAgWs5BA (envelope-from ) for ; Tue, 09 Nov 2021 23:35:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id zgqnDsn3imH+WQAAbx9fmQ (envelope-from ) for ; Tue, 09 Nov 2021 22:35:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BA139261CB for ; Tue, 9 Nov 2021 23:35:52 +0100 (CET) Received: from localhost ([::1]:33156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkZiZ-0007C4-Ve for larch@yhetil.org; Tue, 09 Nov 2021 17:35:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58748) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkZhi-0007Bh-Mb for guix-devel@gnu.org; Tue, 09 Nov 2021 17:34:58 -0500 Received: from mail-0301.mail-europe.com ([188.165.51.139]:41320) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkZhf-0004SM-9L for guix-devel@gnu.org; Tue, 09 Nov 2021 17:34:57 -0500 Date: Tue, 09 Nov 2021 22:34:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rixotstudio.cz; s=protonmail2; t=1636497290; bh=YZFjJUpgz0mwyc87s4aostj0dklSEu8pWX6rs9XCCYc=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=noLVm44VXDpH2iPJiolh1WNCIGjGUKqqMoTt7Q2lrOI61aXe57t+UOFMK+FEmJEzW zAo99k7FXZ2ESyxr0MfCjLYAXcHnJLauFwsHu3dfSMIDH7cCebB9v9T3eA01wofoBd LcuDlMANrDASD46RIZiDkIDWJcrhZUZ02mpBYyYYQARD7aq66N+NrdDAq97QIhDWiP K87W7xsTfSKZtoJih0EvP/018i19c1oHZqBwiliSwzmSqbb7Qni2NaMijpCWOvjX3g uTBVSpG5adOQMvFbR09YXGFatEQDXA1roc30MJ/yj/nD+NyJIHucgKt83RtffcPGiG MiPDKaFZk1ofQ== To: Carlo Zancanaro From: Jacob Hrbek Subject: Re: Unable to define shebang for guix shell file Message-ID: In-Reply-To: <878rxxm0ow.fsf@zancanaro.id.au> References: <87czn9i6sk.fsf@gnu.org> <878rxxm0ow.fsf@zancanaro.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------3bc05a52970e871fa8449e6d319b79908a0d06542b92ad776f86829ca6e52552"; charset=utf-8 Received-SPF: pass client-ip=188.165.51.139; envelope-from=kreyren@rixotstudio.cz; helo=mail-0301.mail-europe.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Jacob Hrbek Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636497353; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=YZFjJUpgz0mwyc87s4aostj0dklSEu8pWX6rs9XCCYc=; b=rw+7Q1bKpQXXw3yntAiE43YsTjQvh4bnqTLeNN6MJe54VQ7Jh5lqzE2lPoee1xulWmW44k 8aXsW1GiurlWg/GteYiK7el5xKhcHKa/ejAUd5zkcIYwG0icFMHeYHQ3sqS6AkLmB7M90A 0+SzwTtinEH04Ap0wHOoPF4jC/yj0ATiqVC9um0EhvcUJFX4TrK3l9CoD3rzFdhW8+bQQN OVZrLoH/wzURA8QIE+vXRO8DZIY+8DrsEP/QnPFNBFApE1axQjjb2KVibsAaWObTAy5sjm SATOWDi3OKGCk7RJnZz/sKrlIll/kFgke3H2/YJiC57DxSX7uCC9eNGPp/u2hA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636497353; a=rsa-sha256; cv=none; b=KrB66FqDC2vXN6QJ334sWBWUXlfTZXjMIs2mg5XEBW4OTQsnuceKOnMOyJBjBKT2aP1Kf/ L/qQRHqTjM0twVLYg6xrB6CqR+CFPu8QgjRctr2LrqQTZRgJMhesXmWRAHRQnTWJlkCiB3 08aZk7aFXnv6cTvvq9HWhJE2BDbeU/BVStdnRHgjJXdc555T9SlTC1bmZukrtJvCV8nuDM vOnOSy+DnR2qPwyV01T01t2GL3fBmxatClMRzKury1HndGusqlZb3XyVe7SXexYdl8L3GC NTUwkwh5pwOl/traFPGIih7o0OD4EqrmL3SMxJopi4Sy9BSA8JLSrGCamRZ+hg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rixotstudio.cz header.s=protonmail2 header.b=noLVm44V; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rixotstudio.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -3.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rixotstudio.cz header.s=protonmail2 header.b=noLVm44V; dmarc=fail reason="SPF not aligned (relaxed)" header.from=rixotstudio.cz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: BA139261CB X-Spam-Score: -3.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: sHHWyVLJphQS This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------3bc05a52970e871fa8449e6d319b79908a0d06542b92ad776f86829ca6e52552 Content-Type: multipart/mixed;boundary=---------------------0662b4a524401d40a0534a34a0918e60 -----------------------0662b4a524401d40a0534a34a0918e60 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 Doesn't seem to work on `busybox sh` for me (I am not aware of better way = to replicate POSIX environment on GNU Guix): 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 ~ $ cat test.sh = #!/usr/bin/env -S 'guix shell --' ... ~ $ ./test.sh = /usr/bin/env: =E2=80=98guix shell --=E2=80=99: No such file or directory /usr/bin/env: use -[v]S to pass options in shebang lines ~ $ cat test.sh = #!/usr/bin/env '-S guix shell --' ... ~ $ ./test.sh = /usr/bin/env: =E2=80=98'-S guix shell --'=E2=80=99: No such file or direct= ory /usr/bin/env: use -[v]S to pass options in shebang lines -- Jacob "Kreyren" Hrbek Sent with ProtonMail Secure Email. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original M= essage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Tuesday, November 9th, 2021 at 10:14 PM, Carlo Zancanaro wrote: > Hey Jacob, > = > On Tue, Nov 09 2021, Jacob Hrbek wrote: > = > > > For now I use =E2=80=9C#!/usr/bin/env -S guix shell --=E2=80=9D, whi= ch works > > > = > > > well enough for me. How does that sound? -- ludo@gnu.org > > = > > Not a solution as (AFIAK) POSIX only accepts one argument. > = > That's the point of the -S. It passes the entire rest of the line > = > as a single argument to /usr/bin/env, which reads it as a single > = > -S argument which /usr/bin/env then interprets as a command with > = > arguments. > = > Something like how this doesn't work: > = > $ /usr/bin/env 'echo hello' > = > /usr/bin/env: =E2=80=98echo hello=E2=80=99: No such file or directory > = > /usr/bin/env: use -[v]S to pass options in shebang lines > = > But this does: > = > $ /usr/bin/env '-S echo hello' > = > hello > = > It looks like this was added to coreutils in 2018 in version 8.30. > = > I wasn't aware of this feature until seeing Ludo's email, but it > = > seems like a neat solution to the problem. > = > Carlo -----------------------0662b4a524401d40a0534a34a0918e60 Content-Type: application/pgp-keys; filename="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc"; name="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc"; name="publickey - kreyren@rixotstudio.cz - 0x1677DB82.asc" LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tDQpWZXJzaW9uOiBPcGVuUEdQLmpz IHY0LjEwLjEwDQpDb21tZW50OiBodHRwczovL29wZW5wZ3Bqcy5vcmcNCg0KeGpNRVlBbDNGaFlK S3dZQkJBSGFSdzhCQVFkQVFLQXBtZFI4dEc5YUtFZHh3SEovWktPMkN2Wk1SV1B0DQpCTk5HcUpV aHAyTE5MMnR5WlhseVpXNUFjbWw0YjNSemRIVmthVzh1WTNvZ1BHdHlaWGx5Wlc1QWNtbDQNCmIz UnpkSFZrYVc4dVkzbyt3bzhFRUJZS0FDQUZBbUFKZHhZR0N3a0hDQU1DQkJVSUNnSUVGZ0lCQUFJ Wg0KQVFJYkF3SWVBUUFoQ1JDdDAzMFVxMEw4cVJZaEJCWjMyNEtUaktobGM0RWpCNjNUZlJTclF2 eXA1N1FBDQovMHRsYmRuQ0l6cmVLWG12VzJYU1lYekFKb3RKZHhDekUrWEFUTStxUERLekFRQ2Ni SHA3eXc2K0FybmcNCmVTdEdGbi9vbGh4VFBkcHU2NDFDTEdpZ1BtRW9CYzQ0QkdBSmR4WVNDaXNH QVFRQmwxVUJCUUVCQjBEYQ0KaUkzalFmU29pM0RaNC9OZm14R2RzUnN2OS9CcU1nVzVqNmpkQnFr eUlBTUJDQWZDZUFRWUZnZ0FDUVVDDQpZQWwzRmdJYkRBQWhDUkN0MDMwVXEwTDhxUlloQkJaMzI0 S1RqS2hsYzRFakI2M1RmUlNyUXZ5cEhjRUINCkFPUXhTL0ovVU0wZWU4azJqYmxpV2QvUTBJZCtY OFVIQlhoeXFWUmMyMnFyQVFETEhjVzk3V1FiU0pGbw0KMTlrd3Q3ME95SGVwRjZMV3BERDBQdUlT WkQ2SUNnPT0NCj05a1pnDQotLS0tLUVORCBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tDQo= -----------------------0662b4a524401d40a0534a34a0918e60-- --------3bc05a52970e871fa8449e6d319b79908a0d06542b92ad776f86829ca6e52552 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKAAYFAmGK93YAIQkQrdN9FKtC/KkWIQQWd9uCk4yoZXOBIwet030U q0L8qcWyAP9e2yJMXZgjDiLKiFR3BPdleiekU2anxvwdDasQmTlCWAD/eVM2 FXVQiRFSOOlxYRQlsDJiUBc+WlqN93fuCiK2AAM= =BK5E -----END PGP SIGNATURE----- --------3bc05a52970e871fa8449e6d319b79908a0d06542b92ad776f86829ca6e52552--