From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id euykGauCx14LVwAA0tVLHw (envelope-from ) for ; Fri, 22 May 2020 07:43:39 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CHLQFKuCx14nZAAAbx9fmQ (envelope-from ) for ; Fri, 22 May 2020 07:43:39 +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 3BCAE9403EC for ; Fri, 22 May 2020 07:43:38 +0000 (UTC) Received: from localhost ([::1]:35514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc2L9-0000Xs-Me for larch@yhetil.org; Fri, 22 May 2020 03:43:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc2L2-0000Sm-0R for help-guix@gnu.org; Fri, 22 May 2020 03:43:28 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:37903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc2L0-0002ik-S7 for help-guix@gnu.org; Fri, 22 May 2020 03:43:27 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id ACA0AB14; Fri, 22 May 2020 03:43:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Fri, 22 May 2020 03:43:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.net; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type:content-transfer-encoding; s=fm3; bh= idCwmD9ZEvibRNavQx7UK7XM1+0rydzZJOkhWeBVAgw=; b=bIpPKzIt98dpYVg0 N0O0NnXf+H1kdy7RoE7pDoCsYFZXSKRRaWdid5FUfxzVNYXlVNAZ17+ajahcBS0w tb/nLpMgzLTgvyLyKhZbr+VYxmd/0JNkLpC964gCq6vp3f1OR17G41ZjXEytRujW A77FbVypykKbihOV/IHOQszmfLJkPwaMrQ/KiZzWhRejoGswTO4BAjpSRndj3BBw 8GqvQnA/WcmVGGgs2dBUipTr0qrBSTtd3iSH/S3+dG09tAKu2woL+DiZTfOGarEo aQNRQhCmpVj19BHBBn5BTsilgHGe41OkoLx7qTcIBWHxHu+SriAzBDNgIHa7TQfC IIAuQA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=idCwmD9ZEvibRNavQx7UK7XM1+0rydzZJOkhWeBVA gw=; b=gl405AUO2EVbEfFf+bL039tt7WxqsnVrmszOpczqi/rLb7TE+Y2qW7om2 MfM7z5LJNwAx6OEicAnFlGiOuH4m4wi+vczk2zhMeYrhdmrM/hFsNGlHF+03rZ0q uSnjcqh6ux4xtlz+oPAbc4qIByar72Q8cWLxPpqOrzu9290Ve3jHqaib0NnCD83m 18kiMdNPpoSI1nxneBWIVajq59zkMTRSLExkDOktRegMAuuRSTekaKwBX9DE0kdb lJwWIkw9JrPDIbpbnNHi/kvYp+gNDi59Vq2EpyrQTn+YKFg4KBQLq92EPz5/vAzu Srp6HMTj2RADJaeY+q6+C/OyVdogg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudduvddguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffffkgggtgfesthhqredttddtjeenucfhrhhomhepmfhonhhr rgguucfjihhnshgvnhcuoehkohhnrhgrugdrhhhinhhsvghnsehfrghsthhmrghilhdrnh gvtheqnecuggftrfgrthhtvghrnhepveehleevgeejuddvgfduieefveetffdvteegfeek gfduueejfeegvdehgeekhfejnecukfhppeelvddrudeiledrudejfedrvddvheenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkohhnrhgrugdr hhhinhhsvghnsehfrghsthhmrghilhdrnhgvth X-ME-Proxy: Received: from khs-macbook.home (lfbn-idf2-1-1364-225.w92-169.abo.wanadoo.fr [92.169.173.225]) by mail.messagingengine.com (Postfix) with ESMTPA id B4E8430664B2; Fri, 22 May 2020 03:43:22 -0400 (EDT) From: Konrad Hinsen To: zimoun , Marius Bakke Subject: Re: Appropriate way to use Guix API from a Guile program In-Reply-To: References: <17234059da3.b5e01d1e8240.9032082708652182693@zoho.com> <878shla245.fsf@devup.no> <17238fa6f3f.1085042d523521.3962992471488424781@zoho.com> <87tv0980yc.fsf@devup.no> Date: Fri, 22 May 2020 09:43:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=64.147.123.20; envelope-from=konrad.hinsen@fastmail.net; helo=wout4-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 03:43:24 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Help Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.net header.s=fm3 header.b=bIpPKzIt; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=gl405AUO; dmarc=pass (policy=none) header.from=fastmail.net; 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-Spam-Score: -1.71 X-TUID: q/cP9kgAOcIW zimoun writes: > If you feel in an experimental mood, you can try the Konrad's patch > [1]. It sets up the PATH accordingly and hides all the internals. In particular it hides implementation details that are likely to change. A look at the path in ~/.config/guix/current/share/guile/site/3.0 should be sufficient to suggest that not very long ago, this was ~/.config/guix/current/share/guile/site/2.2 and scripts have no way to figure out which one of the two is appropriate on a given system. > Well, if it is a script without command-line argument, then "guix repl > foo.scm" is the thing that you would want, I guess. > If it is a script with command-line argument, then extend > "GUILE_LOAD_PATH" by '~/.config/guix/current/share/guile/site/3.0' and > run "guile foo.scm arg1 arg2" is the thing that you would want, I > guess. Thanks for the reminder that my "guix repl" patch needs more work - it should accept command line arguments for the script. Something like guix repl foo.scm =E2=80=93- [ARGS] should be easily doable, and fits in with existing conventions. Cheers, Konrad