From patchwork Fri Jan 27 11:12:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 46444 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 28EA827BBED; Fri, 27 Jan 2023 11:13:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 383BB27BBEB for ; Fri, 27 Jan 2023 11:13:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pLMfH-000265-Ng; Fri, 27 Jan 2023 06:13:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLMfG-00025R-U1 for guix-patches@gnu.org; Fri, 27 Jan 2023 06:13:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLMfG-0003Ia-JW for guix-patches@gnu.org; Fri, 27 Jan 2023 06:13:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pLMfG-00035s-Ev for guix-patches@gnu.org; Fri, 27 Jan 2023 06:13:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61094] [PATCH] doc: Document 'shebang' for 'guix shell'. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 27 Jan 2023 11:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61094 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61094@debbugs.gnu.org Cc: Simon Tournier X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167481797011871 (code B ref -1); Fri, 27 Jan 2023 11:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 27 Jan 2023 11:12:50 +0000 Received: from localhost ([127.0.0.1]:36822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLMf3-00035O-Ou for submit@debbugs.gnu.org; Fri, 27 Jan 2023 06:12:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:46766) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pLMf1-00035H-Vf for submit@debbugs.gnu.org; Fri, 27 Jan 2023 06:12:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pLMf1-0001zQ-Lq for guix-patches@gnu.org; Fri, 27 Jan 2023 06:12:47 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pLMf0-0002o1-5j for guix-patches@gnu.org; Fri, 27 Jan 2023 06:12:47 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m15so3184729wms.4 for ; Fri, 27 Jan 2023 03:12:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MjaQdebNWDw7qEhM2v7GryadosWZRsBiftiuZfN1Wiw=; b=VdFlINLSwbo4SXPxezDIqaV4bL3CjJXTU81PxcWaLV1Eh5L7AgMtdD0btxIjoImVIU rjttUpNEF9EEjXChWjfPY3C+z7bNyOx5vAnJwxxBhyg79QzPWLfCTLjhVQhUngu/cV/V SrNk142Rbe+tQNvjINWwZ9MEktfLOjuN3s4Kpnp7X+5ObCIepwk39+NYutFykzP6efbM B0KJnyQMw1A8Rm0LQ7wpoaNXwbO/CGwIFgCqhccW0nQkb6vuzYlCYQxTjIyW+U8ceoyW IL0ckuq9S7z+ArQZJzeDhKLfNy2jh+iyzeECAhe+i/jgyIFRnd6l/SMzQGfiToqe0rbU jLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MjaQdebNWDw7qEhM2v7GryadosWZRsBiftiuZfN1Wiw=; b=s6GuXvTVtDf7XDFjB73szCNV6pagWElO+BwfrJNWg42sXx99J/Lj1VQ3AdVjVvP4kb ZqLRyGzavMJdbTHSRcse/Sqc2ra/lasJXcO82SUnYvs4gICoy/mYOj/r9+05Nk//M7ZG D6KFafzqR4pzSXYvNTIvt1JAAkI4T2Zmow2uoosn2Oi/8BCZsZtUINgcw5HI96IOswZq OlHrZVPy1bCjd8l0nHOUXI5E9wulE5/LXsVBErOIvLlORuqx9BDmo1XmBhxGhMe9Ee0B C++dGSVBQ7o8PXPotoqJ48s99btw8iZi4Gou1Z+iCpfj/YdVpR2D4scRJW2UukTmk5As YpNw== X-Gm-Message-State: AFqh2kpds01cs3hE9RToxJjszmKv85dzJGKxuwXO/5JkIWRHnPOLr87v siyFMGnZvYnivSduuqcTJQGhjhMZh0c= X-Google-Smtp-Source: AMrXdXtF+Q4+izcRVQEfemuVHftirxxTITJX3tyLma8bCQ9i9H3iIGz1I26XNrYgw5Lm+6pwSepBZw== X-Received: by 2002:a05:600c:3b05:b0:3d3:4f99:bb14 with SMTP id m5-20020a05600c3b0500b003d34f99bb14mr8637756wms.0.1674817964387; Fri, 27 Jan 2023 03:12:44 -0800 (PST) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id c3-20020a1c3503000000b003dc1d668866sm7091661wma.10.2023.01.27.03.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Jan 2023 03:12:44 -0800 (PST) From: Simon Tournier Date: Fri, 27 Jan 2023 12:12:37 +0100 Message-Id: <20230127111237.2910126-1-zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32d.google.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi (Invoking guix shell): Add a note mentioning how to use 'shebang'. --- doc/guix.texi | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) base-commit: 8e1cca32b938cef0812ce042c6c2e8bccb326ec7 diff --git a/doc/guix.texi b/doc/guix.texi index 2b1ad77ba5..acda01c8e6 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -71,7 +71,7 @@ Copyright @copyright{} 2019 Kyle Andrews@* Copyright @copyright{} 2019 Alex Griffin@* Copyright @copyright{} 2019, 2020, 2021, 2022 Guillaume Le Vaillant@* Copyright @copyright{} 2020 Liliana Marie Prikler@* -Copyright @copyright{} 2019, 2020, 2021, 2022 Simon Tournier@* +Copyright @copyright{} 2019, 2020, 2021, 2022, 2023 Simon Tournier@* Copyright @copyright{} 2020 Wiktor Żelazny@* Copyright @copyright{} 2020 Damien Cassou@* Copyright @copyright{} 2020 Jakub Kądziołka@* @@ -5923,6 +5923,19 @@ building or downloading any missing package, and runs the guix shell python python-numpy -- python3 @end example +@quotation Note +@cindex shebang +@command{guix shell} can be used as @emph{shebang}. Consider the +previous example as an executable Python script, the @emph{shebang} +reads, + +@example +#!/usr/bin/env -S guix shell python python-nympy -- python3 +@end example + +All the @var{options} or convenience of @command{guix shell} apply. +@end quotation + Development environments can be created as in the example below, which spawns an interactive shell containing all the dependencies and environment variables needed to work on Inkscape: