From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UC+4HVxWiWF5OgEAgWs5BA (envelope-from ) for ; Mon, 08 Nov 2021 17:54:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KJN7GVxWiWEwDwAA1q6Kng (envelope-from ) for ; Mon, 08 Nov 2021 16:54:52 +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 9A423144ED for ; Mon, 8 Nov 2021 17:54:51 +0100 (CET) Received: from localhost ([::1]:36626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk7uz-0001v4-Q5 for larch@yhetil.org; Mon, 08 Nov 2021 11:54:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk7ua-0001ui-1J for help-guix@gnu.org; Mon, 08 Nov 2021 11:54:24 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:36988 helo=mail.yoctocell.xyz) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk7uW-0005Jk-V1 for help-guix@gnu.org; Mon, 08 Nov 2021 11:54:23 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1636390455; bh=a5toSBFFmOq+yDpR+KD/yhrSuTIWv1ZK6OVCkQGYbQI=; h=From:To:Subject:In-Reply-To:References:Date; b=YuCWAXBzWXd0uo2l7V1UdaKk7cuGhNNBVVDbxb38EJqALdkGxi7RXoKxGCRVbB8aQ EkPmYvk4d660pFZ/rJs8BvRYMczdvCBA44Xzi3ArYA13WxJSxlKRwIZ03UplG8yDq+ atcvoSXTGr0IP2nogGfs4koC1khTrXg2DyoawfP8= To: Foo Chuan Wei , help-guix@gnu.org Subject: Re: How to add /bin/sh to the build environment In-Reply-To: References: Date: Mon, 08 Nov 2021 17:54:12 +0100 Message-ID: <87bl2u37wr.fsf@disroot.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=87.96.130.155; envelope-from=public@yoctocell.xyz; helo=mail.yoctocell.xyz X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FROM_SUSPICIOUS_NTLD=0.001, PDS_OTHER_BAD_TLD=0.001, PDS_RDNS_DYNAMIC_FP=0.001, RDNS_DYNAMIC=0.982, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636390492; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=kzqepJgjgEy9aLPnyPK3xYv3VJQ9XLq91Vq4T3xnT5A=; b=Nq1pA279mo2L1A6lz5Yn27yRiM/itXs+M6OeVIC3jXPxpPtqGQ4qbX3eIlB/1aC9mqybNH 2vZNccvfhD0dtKWc5eRzLUqeNgayXuzO/wNM4yqUct4RetajSAl9Md8guEvmeCbBmqF1IA BOmHWu4PxN1solrVfw7M7+12PmC+G9z0E6tdwBy0BAa1qLd3xwGsM7hRUUGT+Mp2gk8A2C LxkOd7pp+3oKjpctcA2gqLFoKtXU0YXuZXbu419EiDOVt/ZtHfZ4LDMjG0mUevPPWYd8a4 yRXbctNA1Pd+p1GncpFgqWToSSjnMSdUHMWvC2ndP2zIB/z+/6BiAOcnac4ktg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636390492; a=rsa-sha256; cv=none; b=i+Iv5GT8IguEFMy9wsmNJyWPAyT5bnA/LJkbo2g91dg9s9Z4FF+Pk0igddgu/ReCglt0rN 2qBDZn/QUnYIxEmaEdRzuvakJAEVXdFPnilI906MuVLGEgwa+1suoYt+9/BZSGfMGZuwDH osodOEDE/tF6FY+3q9vbIy/jjVg8qsJCME9an2TgGj8cDzRANAaMFzMSAuTFSE7BdNpcaQ cmicA0xzWOy/gqs4VIUA/PAo5y5Yx7wcGWmTRA39PoGwYBlTdkQY6EfkBhnyZPrbb9Ppzp AZ+yIGgGJJWNA3YVTwq9CvFPD/VLp9Cu2Ko1LWBdT+F9NAlUU0LLQtdgNgl72Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=YuCWAXBz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -5.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=yoctocell.xyz header.s=mail header.b=YuCWAXBz; dmarc=pass (policy=none) header.from=yoctocell.xyz; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 9A423144ED X-Spam-Score: -5.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: XgbimHsEKzgn --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, On Mon, Nov 08 2021, Foo Chuan Wei wrote: > I am trying to package the Standard ML of New Jersey (SML/NJ) compiler > in Guix. My current understanding is that its installation process > relies on the existence of /bin/sh in a fundamental way. Is there a way > to add /bin/sh to the build environment? > > In the build phase of the package definition, I tried something like > this: > > (mkdir-p "/bin") > (symlink (which "sh") "/bin/sh") I would use =E2=80=98substitute*=E2=80=99 from (guix build utils) to patch = the references to /bin/sh (lambda* (#:key inputs #:allow-other-keys) (let ((sh (assoc-ref inputs "bash"))) (substitute* "some-file" (("\"/bin/sh\"") (string-append "\"" sh "/bin/sh\""))))) Hope that helps! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmGJVjQVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5HSkP/2vtErtD3v0WmpgWsjETjL+Lq2Ps 9Nj/k0n8IUz3YfiiA+uPfaR/F/eIqJTdVyGi6za7IErsLuuvPmu6NBquklzXd2YW +WnVR51zsDsFsnLoa9F4MXbsyW9XjKa1CKH8jmSwuifzACJBYMCPoLXhZ7AdvEcz NInDPlaZh0PpRYsJMJRV2aKxlWAVuymv0PYvwjFJATFZUTuiWBCinHobXSRh/gMJ 3hBSzMtvGmu7+PtAMaHyetaK5GrzFm1Us58qtpR1vj4MXqJ3R8qNQ5QmuO6zsJH4 T6CwEy/xyHCrtOLrrQFG1Ov1LaVl87aS1qOwy1fBcVlP36jmRvU9OEoz9JH5eZvU U5CEABKG3JkQBMZbN4cQnWU400SYgzhbilgdVu4RxmzpwKeUZTRXi4dyySOrnwni DT0Pfhr40++s/Moq5lmaygfvHfSDT7j14BhTCCp7E2jJJK3exmVhu+KK/SBrqYBJ MiNqEcA0BxstU3iNRpxNn2JcHyxqoW6mEPfq7Ru2kqjrKIqZLdypQLXO4+Zxs2Bl vuZO2ETgzVPfSmUUOi5+ymxqq6WnFqz4G3uSuH7avAVfPTlp+UQHcMhRNd/XYFm3 8D/HJuxzaDv7tBJFwNCkjMeV5NXJURh4OjqGYa72s1YoGKjh8W3nKyY7SRWYiNtR 4qSjho4o4Z+k5saI =4fE9 -----END PGP SIGNATURE----- --=-=-=--