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 OK4kE5bhx16YVwAA0tVLHw (envelope-from ) for ; Fri, 22 May 2020 14:28:38 +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 yB7TDpbhx156dAAAbx9fmQ (envelope-from ) for ; Fri, 22 May 2020 14:28:38 +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 C47B8940980 for ; Fri, 22 May 2020 14:28:37 +0000 (UTC) Received: from localhost ([::1]:33328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc8f4-0001mn-OG for larch@yhetil.org; Fri, 22 May 2020 10:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56246) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc8ey-0001me-5U for help-guix@gnu.org; Fri, 22 May 2020 10:28:28 -0400 Received: from sender4-pp-o93.zoho.com ([136.143.188.93]:25376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jc8ex-0000rC-1o for help-guix@gnu.org; Fri, 22 May 2020 10:28:27 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590157703; cv=none; d=zohomail.com; s=zohoarc; b=oKu5OKEF1ziD/jElbOnDlAuSsbjqmV5h8eAJRwu2StY2E3ulfRRCmAMBoxf2eC94hhGE6gaN3p5MWky45WdCSYpfjZ/1mosPiv+wr6CosIoX3fqki1B4XUIFPeR0PVcXKJoi5a4CC6Arway/3oyla4KkPu1iR/Hzf+OrNpIYVBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590157703; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=7OFZpu2hUGHU24yWZP/eM9OkL/21Qbi6fI+ZTaKmLCw=; b=aCm74BtCoiQ0boG84vS082Z9kz6/GfAL7hWiMlxJYxTyho2TTljhNtDi/qmSfLp2He3J7pcyms8OPtIMKqohOo7dow3LLuHdRnkr+hiuQQBoCcflCvQ1jvXC/UtbSK8Lj41k3O2DEwuU1K3E7kMv9lEPzcyMK9f/S3wWEXEw39Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=sirgazil@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=RS6xFdSE1TvAvFCpQfbQNNhUhIkR7/DCiTGJr9pSSs9AKkIF5tZm8q+5S1zSasWqB1RqhS9bWxjM JUNLbEXRCoPcEQC9ABug/FE2Jcx6xDPaHZEQgbVmS5WE0Ao4+T1B DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590157703; s=zm2020; d=zoho.com; i=sirgazil@zoho.com; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=7OFZpu2hUGHU24yWZP/eM9OkL/21Qbi6fI+ZTaKmLCw=; b=BAUCXR+z89b4kAT/yH/5hozuNcaDQ7MPEiwnLvKAsgqgE+0W/eYo3WQmguSoZltN +dhYjOyeauEith82XK5zp3ZJdoUxvoO3v0mViDZM3aVtkoY7NCkTg8zdfpbXeM628wI oLnS6VIh43yTDNWWurXsBdZoSneU/6Di5ONubimY= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1590157696717345.2901881652648; Fri, 22 May 2020 07:28:16 -0700 (PDT) Received: from [179.15.13.185] by mail.zoho.com with HTTP;Fri, 22 May 2020 07:28:16 -0700 (PDT) Date: Fri, 22 May 2020 09:28:16 -0500 From: sirgazil To: "Konrad Hinsen" Cc: "zimoun" , "Marius Bakke" , "Guix Help" Message-ID: <1723cc8decb.faa996e533509.5321030884090407291@zoho.com> In-Reply-To: References: <17234059da3.b5e01d1e8240.9032082708652182693@zoho.com> <878shla245.fsf@devup.no> <17238fa6f3f.1085042d523521.3962992471488424781@zoho.com> <87tv0980yc.fsf@devup.no> Subject: Re: Appropriate way to use Guix API from a Guile program MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Importance: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail Received-SPF: pass client-ip=136.143.188.93; envelope-from=sirgazil@zoho.com; helo=sender4-pp-o93.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/22 09:52:36 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-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: , 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=zoho.com header.s=zm2020 header.b=BAUCXR+z; dmarc=pass (policy=reject) header.from=zoho.com; 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.20 X-TUID: 82mfsBF3rz51 ---- On Fri, 22 May 2020 02:43:21 -0500 Konrad Hinsen wrote ---- > zimoun writes: >=20 > > 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. >=20 > In particular it hides implementation details that are likely to > change. A look at the path in >=20 > ~/.config/guix/current/share/guile/site/3.0 >=20 > should be sufficient to suggest that not very long ago, this was >=20 > ~/.config/guix/current/share/guile/site/2.2 >=20 > and scripts have no way to figure out which one of the two is > appropriate on a given system. >=20 > > 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. >=20 > Thanks for the reminder that my "guix repl" patch needs more work - it > should accept command line arguments for the script. Something like >=20 > guix repl foo.scm =E2=80=93- [ARGS] >=20 > should be easily doable, and fits in with existing conventions. And if you wanted to run the script without typing "guix repl", what would = be the first line of the script. This? #!~/.config/guix/current/bin/guix repl !#