From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oINbOkKgvGCqGAAAgWs5BA (envelope-from ) for ; Sun, 06 Jun 2021 12:15:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id EMiwNUKgvGBHbQAAB5/wlQ (envelope-from ) for ; Sun, 06 Jun 2021 10:15:30 +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 A1FED10D4E for ; Sun, 6 Jun 2021 12:15:30 +0200 (CEST) Received: from localhost ([::1]:34298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lppoX-0006u9-Np for larch@yhetil.org; Sun, 06 Jun 2021 06:15:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42386) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lppo0-0006te-HI for guix-devel@gnu.org; Sun, 06 Jun 2021 06:14:58 -0400 Received: from albert.telenet-ops.be ([2a02:1800:110:4::f00:1a]:35920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lppnx-0004dT-3s for guix-devel@gnu.org; Sun, 06 Jun 2021 06:14:56 -0400 Received: from [172.20.10.4] ([188.188.136.113]) by albert.telenet-ops.be with bizsmtp id DmEm2500U2SyTPg06mEnJL; Sun, 06 Jun 2021 12:14:47 +0200 Message-ID: Subject: Re: Question: wrap-program without #:sh can be ok even when cross-compiling? From: Maxime Devos To: Leo Prikler Date: Sun, 06 Jun 2021 12:14:40 +0200 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-TWR7Ou3VFNl9wM3c8lDl" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1622974487; bh=6zsNGKMWxsVpCxc6VTDp9DOZRvUtkSXmvmWZRcdDCKM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=CyqoZ7HbVviXsAhlsR7WqY3myUtjBAGtxY6l3bNhnB3lClmUuWzyIsWb2iVeL0yoz PfhvQazic4Xd4PCMCQ5zdwJLKdt3TyE+v5ieYEd46SI0hIkdcsMT0bINj+4Jvh6eME 274l9iNgEay3K4aC8/akBWdBQrMMaRRd6L9PB4MKULUo1InmuuIU5cgaUa/KzOFigV PNrxy+uz00Uhi6GYgLTVA5fNXZn3sVKbQq9Bk2p8JOcbGzVL+zswHS61ZaEOW06ov5 xWSH81pzERj0ATahwoojuAzpaK7+AbXZTXgmbrdJdRIEdSxvWwR2pLLz8n1ocWH4S2 J5zMtmvdf9tbQ== Received-SPF: pass client-ip=2a02:1800:110:4::f00:1a; envelope-from=maximedevos@telenet.be; helo=albert.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=1622974530; 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=6zsNGKMWxsVpCxc6VTDp9DOZRvUtkSXmvmWZRcdDCKM=; b=k2v+gMa4MUrd0piUU1FJ4w0q2NuQttDJE0RMCbijtS72rerTZ67AG1tjUrPSljbCLbOu43 QsJWgQDbWyRCcDQgreVh4erPu0avKPW3N2ROvEE2UggSfKA4/wn2XtUsYiUCgO9ATzosev 4hlCDo9iALz73PzBYi7T7SASR4/KWmAih+MrTrc+9JRDH92pneX0aoFN4am27r1iFmTVDk Cy7a0/LIaNdVAEP6gCJI8Yt8uSahC5DPRP2zo6x/qjVhKZRFrUtsXPKZWspUyPI24Srimv FBlLmU00Qtv+rgDHO/J49RSknPGXE8ydDFeQP1sCVvFuJSl+e0iE3Mgohq0Mzw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622974530; a=rsa-sha256; cv=none; b=HFiIor7tRYn2mItyWZyQEKIfYMW9lPdpwDtNQuwpozc8lDRA6ZSmq90R7djU4IDYE1QGW1 A8QHK7bIpggManaxESAf2ONaM72o1UPwesc5UVEIsvcSN6AISBPUPzFBBzRvpHPA872D5P Tdly/C1RwuLACe4a2Hk6/mtRaScOVmZBu4sccRls6j5dAbKwDc7xNpBzITGlCusgfiFvNf HZSn8UZUu07xBSaGA71LH5CeGqheH0XqdmPrKKqicDSftTiI8enRg0ZOj8suiemV40s2SZ sg0e+7Cxyn1kb90I1CUafHm3/cP72101P3DqkSKvJHHT9+6Mok6N9ldrJZMu+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=CyqoZ7Hb; 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: -4.23 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=CyqoZ7Hb; dmarc=pass (policy=none) header.from=telenet.be; 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: A1FED10D4E X-Spam-Score: -4.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: Yr5SctzzueaB --=-TWR7Ou3VFNl9wM3c8lDl Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Leo Prikler schreef op zo 06-06-2021 om 09:39 [+0200]: > I think we might want to export a utility procedure > (patch-shebangs files inputs) This procedure already exists, but is undocumented and unexported. It is in (guix build gnu-build-system). (define* (patch-shebangs #:key inputs outputs (patch-shebangs? #t) #:allow-other-keys) [...]) > so that files used during build (e.g. configure, Makefile, etc.) can do > (patch-shebangs build-stuff native-inputs) and the rest implicitly gets > (patch-shebangs files inputs) during the patch-shebangs phase. WDYT? Looking at %standard-phases, we have (define %standard-phases ;; Standard build phases, as a list of symbol/procedure pairs. [...] (phases [...] unpack bootstrap patch-usr-bin-file patch-source-shebangs configure patch-generated-file-shebangs build check install patch-shebangs [...])) Here, patch-source-shebangs calls patch-shebang for every file in the source code. As #:path is not set, $PATH is used. Thus, when cross-compiling, native-inputs (+ some implicit inputs) is used, and when compiling natively, the union of native-inputs and inputs (+ some implicit inputs) is used (*). Thus, the files used during build (configure, Makefile, ...) already get a =E2=80=98good=E2=80=99 interpreter. (Unless I'm mistaken, I didn't te= st this.) (*) I looked into separating 'native-inputs' and 'inputs' even when compili= ng natively but it turned out to be more complicated than first expected. Greetings, Maxime. --=-TWR7Ou3VFNl9wM3c8lDl Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYLygEBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jbvAQCDWk1IgFYmtG3khGLP5M0n5pCF uH/ZDJ9zJBeUDLq1vAD/YMDekcNGYh+aXVrHzrWuiju39V8RnKbqYbgsNP48pgY= =x6UR -----END PGP SIGNATURE----- --=-TWR7Ou3VFNl9wM3c8lDl--