From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <help-guix-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms5.migadu.com with LMTPS
	id aKyPAaYlPmP0VgAAbAwnHQ
	(envelope-from <help-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 06 Oct 2022 02:47:34 +0200
Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id OAGeAKYlPmMIlAAAG6o9tA
	(envelope-from <help-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Thu, 06 Oct 2022 02:47:34 +0200
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 A096D3D64D
	for <larch@yhetil.org>; Thu,  6 Oct 2022 02:47:33 +0200 (CEST)
Received: from localhost ([::1]:42224 helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <help-guix-bounces+larch=yhetil.org@gnu.org>)
	id 1ogF2y-0005ww-GE
	for larch@yhetil.org; Wed, 05 Oct 2022 20:47:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57574)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@gmail.com>)
 id 1ogEzd-0001aX-EW
 for help-guix@gnu.org; Wed, 05 Oct 2022 20:44:05 -0400
Received: from mail-qv1-xf2b.google.com ([2607:f8b0:4864:20::f2b]:46686)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@gmail.com>)
 id 1ogEza-0007VJ-I4
 for help-guix@gnu.org; Wed, 05 Oct 2022 20:44:05 -0400
Received: by mail-qv1-xf2b.google.com with SMTP id j8so278312qvt.13
 for <help-guix@gnu.org>; Wed, 05 Oct 2022 17:44:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:in-reply-to:date:references
 :subject:cc:to:from:from:to:cc:subject:date;
 bh=Y8tnCngkp7v4b8ezwIwz42CU+JeSVYijtsgvSAvgxHw=;
 b=G8cjRyX35kMErLUUL+T97pPUZEMd9UpsR9/+WKUJF4fk9LzM5Xd0K7FWtUlOCw5Jvm
 Sdi3uDA9CWjgXA/Pj7tUZZ0N3o9omLHXjWif2Lo1/nTkUwjc1ze9rdQ4QNUom+Jo2UT/
 UClS+ERzXU9mN1QBot4abx6QV/ZjmmugElQbOBSU3zR2zC8BwYKIuKaO/JD7wmP4VDCk
 yHy6g2lKTPSXnvlfJPi6TKy3zafUTrE5S53hONpL2C81cViSdn1VqPiGkf1u8Oy7mB/S
 cGTjXVHWSoSY7yYKBXn3YIkVsgwcX3XL/X8pNFX3KZA73FqdIERULSxAhM96ODUql5ha
 fHmg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:in-reply-to:date:references
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date;
 bh=Y8tnCngkp7v4b8ezwIwz42CU+JeSVYijtsgvSAvgxHw=;
 b=Hc7NLcRvkYPCEei3COxssTu0WxEBFVINO0R0A2F+7JYm69Ka6epunxiufK4xvBRs84
 Vg3zOMcJlvwGnrnq30g/Gv6efxugeROOa38msuMXqEDRuPrl7Hp0EYZ76t80VUzpAYfC
 H7QmpY0AqQ21X/jQi0WaakIM53tBf7YzqL0pYkqWr7hx6OivHd/0SYmvvl2y06RpXJdx
 IVrcKv8C1RSHkrdwAE+XrW9NEeL9fNtD7iMUL9jii9xi0xqgZeLQuD8bbv58YOWw/O6o
 ENN+LRdH6HwyfbvpHWfsP3WnzquZJUPjCUTMtvbte2GBy9ArDoD+OTollxOjhBfRmKVx
 0IaQ==
X-Gm-Message-State: ACrzQf3sFNaGxOfuVxupWNL7URqnc5mH+vO6m2W7kmhRyz+0uY5KD3bF
 OEWE2HcsZERr8Dn1B27+iYo=
X-Google-Smtp-Source: AMsMyM6yim4Zy9LADS20JsP6Rn/5yoI4NEFsoXn8TE99Bq6K1rcgQJiC1nHcv5JRFI0Sls7LLB44Sg==
X-Received: by 2002:a05:6214:27e7:b0:4b1:87eb:a9c3 with SMTP id
 jt7-20020a05621427e700b004b187eba9c3mr1893489qvb.130.1665017041279; 
 Wed, 05 Oct 2022 17:44:01 -0700 (PDT)
Received: from hurd ([2607:fad8:4:3::1007]) by smtp.gmail.com with ESMTPSA id
 c3-20020a05620a268300b006cbb8ca04f8sm17348880qkp.40.2022.10.05.17.44.00
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 05 Oct 2022 17:44:00 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: Olivier Dion via <help-guix@gnu.org>,  jordi <jordila@librebits.info>
Subject: Re: bash scripts in Guix question
References: <YzwyrJbCMXBTWqaE@mercurio> <871qrnk61s.fsf@laura>
 <871qrnj5wu.fsf@gmail.com> <877d1eapma.fsf@laura>
Date: Wed, 05 Oct 2022 20:43:58 -0400
In-Reply-To: <877d1eapma.fsf@laura> (Olivier Dion's message of "Tue, 04 Oct
 2022 23:58:05 -0400")
Message-ID: <87tu4hixwx.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::f2b;
 envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf2b.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: help-guix@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <help-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-guix>,
 <mailto:help-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/help-guix>
List-Post: <mailto:help-guix@gnu.org>
List-Help: <mailto:help-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-guix>,
 <mailto:help-guix-request@gnu.org?subject=subscribe>
Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org
Sender: "Help-Guix" <help-guix-bounces+larch=yhetil.org@gnu.org>
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1665017253;
	h=from:from:sender:sender: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=Y8tnCngkp7v4b8ezwIwz42CU+JeSVYijtsgvSAvgxHw=;
	b=RMOz4tnYEmmwOgevMIENtjqfL54XVkCwAijiVNVROIWdjPZ+x6k+ht3ClXbQ3REL4x+16c
	Vp2oI1rP/eR5wz/UzFZ7XRgFuzDFLd6vRK/+obsLzV5UXWoAqvXOONe7zuLqD171Z2R2Yd
	OwDInilIEy+9N/EP/e9fBGxckaxY2g74/wVaH6DM+TlsJKk8DJ2I/rdHD/zbiGdiIKJWwk
	Orvtrkbw3bCGs+Al4fujwhBKyLn8ZlRuZDxrcsJJUqEIs2F/s4Tl0ZQBAKWEqPS+8p/Sdl
	NOiighr9JiXUsNdEqtnyS4JXznbqEop1yyiMt+SemBY23RDTPkIX8klxrfGtTQ==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665017253; a=rsa-sha256; cv=none;
	b=YC17cnNPzM6FCTIVXS93zSO5IvKcm68iC8RCe1Puov6DU0iyjtJZDmvvsBZJYnc2IrwRgD
	Hm5Ww8Ngb4YtDV0delx7pIhrPY31E+6yFgWq2LEgEH5CQjlefQx4b7QXRMDR6fw3xS9aY/
	IjHSTPzBvsVQu/D1cB1CuKLeh+fMiknaN6MZr3bSgAA1RflwRU7JZGxNmCpNaxB3nNi+G3
	FUxEU9J77a06/gk4sqXFhuoRij6HY4wLidHyl38mFPBrXjVcm5oKDpyeo9NCHHG0mjpQX+
	h5OkNWhwEA5JZ9zBKgKj7tTx5+cSofpHgc/eFa1TdWEXOH5knQaJ5FtE3/Duzw==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20210112 header.b=G8cjRyX3;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Spam-Score: -3.86
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=gmail.com header.s=20210112 header.b=G8cjRyX3;
	dmarc=pass (policy=none) header.from=gmail.com;
	spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"
X-Migadu-Queue-Id: A096D3D64D
X-Spam-Score: -3.86
X-Migadu-Scanner: scn1.migadu.com
X-TUID: wpbuHbtIljOj

Hi,

Olivier Dion <olivier.dion@polymtl.ca> writes:

[...]

>> I prefer the "#!/usr/bin/env bash" shebang; /usr/bin/env is available on
>> FHS distribution, and on Guix System, for convenience.  You can use if
>> for any interpreted script, such as Guile, Python, Perl, etc.
>
> Only if coreutils is in the profile that would work yes.

coreutils doesn't need to be in the profile since /usr/bin/env is linked
to (file-append coreutils "bin/env"); see in the value of %base-services
in (gnu services base), which contains:

--8<---------------cut here---------------start------------->8---
(service special-files-service-type
                 `(("/bin/sh" ,(file-append bash "/bin/sh"))
                   ("/usr/bin/env" ,(file-append coreutils "/bin/env"))))
--8<---------------cut here---------------end--------------->8---
                   

'env' looks up the command passed to it from PATH, but that's usually
satisfied if you were going to use a FHS location anyway such as
"/bin/bash".

-- 
Thanks,
Maxim