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 ms11 with LMTPS id OF6VM2t0GmAjXgAA0tVLHw (envelope-from ) for ; Wed, 03 Feb 2021 10:01:15 +0000 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 MM5jL2t0GmDHTgAAB5/wlQ (envelope-from ) for ; Wed, 03 Feb 2021 10:01:15 +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 1ABFB9409E6 for ; Wed, 3 Feb 2021 10:01:11 +0000 (UTC) Received: from localhost ([::1]:50380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l7EyE-0006pI-0T for larch@yhetil.org; Wed, 03 Feb 2021 05:01:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7Ey0-0006nW-PU for guix-devel@gnu.org; Wed, 03 Feb 2021 05:00:57 -0500 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:42146) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7Exy-0004dy-Kw for guix-devel@gnu.org; Wed, 03 Feb 2021 05:00:56 -0500 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id Qa0p240060mfAB406a0pwP; Wed, 03 Feb 2021 11:00:49 +0100 Message-ID: <6d41cb49f87561620e46f5e8a25946f2fbb927ab.camel@telenet.be> Subject: Re: Installing a wrapper guile script in /bin From: Maxime Devos To: elaexuotee@wilsonb.com, Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Wed, 03 Feb 2021 11:00:24 +0100 In-Reply-To: <2VMUHEHLO03FL.3AF0SWRKGMFZ3@wilsonb.com> References: <3EA9135IVLYXR.223U6JDXT4SSS@wilsonb.com> <874kivlqol.fsf@gnu.org> <2VMUHEHLO03FL.3AF0SWRKGMFZ3@wilsonb.com> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-KSxS+lotyfNGZaeT3yRo" 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=1612346449; bh=L5Te8+BnyiztGh1wVAsDcYwSROtwrx/y0/pmX9Ieahc=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=GP6s3gT2RE2qY3uHMlp486SQCT2Uo9Q/ciAG9AY5sqcZ5MVUkVUukAlvES9y3U2w/ K4jXN2lvIgH1eFbp22urVC9z7ww9HON4WHA+0LT2mf1CDMYgZmAE98//xvFgEbqiK8 +uiOPs7TnSArwj1KV+xzXhlve3Uq95SWpsF8aJ+P+yr7NWJFBJ9hd2jOCkNgTLNNHn 0dYD2EMqoLYRfRH/xqzm/tqzEu6wGZl6Ppozw+YBXapBLXyqWSgo1p/P3ZC/LZMjWh sAAJuDEyE4ZBX2MSwuNlRfIJOCfwWnG18IdivKHOABRq2k+LvPYEjaA+SXhzFKxg5L +CGqsmsFrI9vQ== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.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 X-Migadu-Spam-Score: -5.16 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r21 header.b=GP6s3gT2; 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: 1ABFB9409E6 X-Spam-Score: -5.16 X-Migadu-Scanner: scn0.migadu.com X-TUID: GdgQX2IrwlB9 --=-KSxS+lotyfNGZaeT3yRo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Say I have a script that reads /proc/cpuinfo and runs my executable with = the > correct flags to load the library with the best CPU features possible. Ho= w can > I embed such a script in the package definition (as a gexp?) and install = it > under /bin/? Let's presume the binary is called $X. What I would do: add a build phase after the "install" phase that renames /bin/$X to /bin/.$X-real using the rename-file procedure. Create your wrapper script at /bin/.$X-real with call-with-output-file, some I/O procedures and chmod (to make the wrapper script executable). I hope that helps, Maxime. --=-KSxS+lotyfNGZaeT3yRo Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYIADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYBp0ORccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iVrAQCdOAffSXQf+OYBTTuWaBhT/Lrm Xc8qJnjtMuqbAb4emQEAxalkf2otgvQ/Ly9lH5IatklYSPBEvUTx2qVCkE5vPQU= =G/vW -----END PGP SIGNATURE----- --=-KSxS+lotyfNGZaeT3yRo--