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 +ECPLVTmF2BzUAAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 11:30:28 +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 iH0cKVTmF2BzRgAAB5/wlQ (envelope-from ) for ; Mon, 01 Feb 2021 11:30:28 +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 5E3879402D4 for ; Mon, 1 Feb 2021 11:30:28 +0000 (UTC) Received: from localhost ([::1]:55366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6XPX-0007KN-68 for larch@yhetil.org; Mon, 01 Feb 2021 06:30:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47412) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6XNq-0005mR-Tu for guix-devel@gnu.org; Mon, 01 Feb 2021 06:28:44 -0500 Received: from m42-5.mailgun.net ([69.72.42.5]:45358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6XNl-0007uM-Fy for guix-devel@gnu.org; Mon, 01 Feb 2021 06:28:41 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.wilsonb.com; q=dns/txt; s=krs; t=1612178916; h=Message-Id: Subject: From: To: Date: Sender; bh=f8CH4iNsPZZpRptZBFuZ2njySj6NeCvKEvJlF3z7T98=; b=cR2H3t8705SZ4OcpxtFtFHzk1EsHep2yNXZf3eExNVZACAOp/2DAPqYiBlFNlEO6rqEBX+02 3KqP6X+wu5h/QjMhyj5AYyPZNfPUlP9MJQIoMSOqssakk1j7/b/9HhFacuuiZux5uaznRv9E r7Gqg0rJ0/M+txw5yQvPtwlw9Kla19NPIjQ3Lb4sh5v1jVx2m7cAkGDU2TFbP87rNG65A2uP BGYlj184R/QWY3/H4GBg1U8dvpSjmkuuxSKcil3u2fJf3Cz53jopb9XYv5HrZAQWgVE2coY4 A5voZitoToZXx/nstxA/UtKb1PJv0G7vqJv4MqYXDmLhJBQ1bHaVeg== X-Mailgun-Sending-Ip: 69.72.42.5 X-Mailgun-Sid: WyIyNWJlMSIsICJndWl4LWRldmVsQGdudS5vcmciLCAiMDg1NDdhIl0= Received: from wilsonb.com (wilsonb.com [104.199.203.42]) by smtp-out-n01.prod.us-east-1.postgun.com with SMTP id 6017e5e27a21b36a9daee1a7 (version=TLS1.3, cipher=TLS_AES_128_GCM_SHA256); Mon, 01 Feb 2021 11:28:34 GMT Received: from localhost (q007238.dynamic.ppp.asahi-net.or.jp [203.181.7.238]) by wilsonb.com (Postfix) with ESMTPSA id 75B79A18A0 for ; Mon, 1 Feb 2021 11:28:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wilsonb.com; s=201703; t=1612178911; bh=f8CH4iNsPZZpRptZBFuZ2njySj6NeCvKEvJlF3z7T98=; h=Date:To:From:Subject:From; b=NFeFNSwXkJ6RZiTQRnGkSmUJtGzIGJSDemMHWgLoyTsXEhCR0jZLXnxTsvwf2LDnA o9MOfS01ncCp+yj6Jf9xMrYWczpJNOR9fYhfn7GuxlcOrYrts6IsIRLwjtDx8i4zaL CSvP5csslIk6sE3aodWMZTmTGb1c/PGXLG3AuTpoxPLEBB79gA5aOYFLRXNroVLMep z3z2/A1ZrrnraYFMgHPN0SPlg7lXksDdVbIvkcv3QoT2te38dGBpUcvHINApCWHrbj ZGXY/lUGIGcVUbV1vzTBTnLOK8UPaWMt40FO595TaIrgnHu/agiKi/yurD7USi5m83 +4RQl3VXZlsIyewMWlfIKtKVbpMxzpYe5k2q+00aMqLC0kbfoSkQsKPs8TgNoO5qRp 8fp13PRVC9VMsF2Ei7M+u/C7enKsK9q1Ld/Ao/MLUBs2wFVS///YBALUAiMhjY7qIp CFnOIZMDAZ183y5i7TJzIEJw3EYvgR3QZfcWYKZYuCsgXJbbFOXSheODHpQrY+OxNB VxGh35zT+d7hC92Y6hC2AuHuCAJGCpXWPPnCd19QwyANi3p8sMu7USpaUVaKxTRjGW WDANSNQJoblxD/OteQTEogzoto2CsT7qk615ImXVvS4swuUJkRG1hiCuv6trU1T4X4 5/lCcVTELTxz7ufrFNJtPDM4= Date: Mon, 01 Feb 2021 20:28:34 +0900 To: guix-devel@gnu.org From: elaexuotee@wilsonb.com Subject: Installing a wrapper guile script in /bin Message-Id: <3EA9135IVLYXR.223U6JDXT4SSS@wilsonb.com> User-Agent: mblaze/1.1 Received-SPF: pass client-ip=69.72.42.5; envelope-from=bounce+ec9951.08547a-guix-devel=gnu.org@mg.wilsonb.com; helo=m42-5.mailgun.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.06 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mg.wilsonb.com header.s=krs header.b=cR2H3t87; dkim=pass header.d=wilsonb.com header.s=201703 header.b=NFeFNSwX; dmarc=pass (policy=quarantine) header.from=wilsonb.com; 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: 5E3879402D4 X-Spam-Score: -3.06 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6xxmZQqIddAy Hello Guix, Writing package definition, I have need of a non-trivial wrapper script that decides how to execute the installed binary. How do I accomplish this? With my vague understanding, I am envisioning writing a gexp directly in the install phase and would like to somehow reify this into a guile script and install that file under /bin. Is this correct, at the high level? More specifically, the package I have builds separate libraries for CPUs with AVX, AVX2, and no AVX support. Since build-type isn't sufficiently specific to distinguish such CPU features, I have, so far, opted to just build all three libs and stuff them under /lib/. My idea is to have the linker script check CPU features at runtime (by parsing /proc/cpuinfo or something) and executing the binary with the parameters to load the correct binary. Perhaps there is a better overall approach? Appreciate your thoughts!