From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8A/CLjHZx17cZwAA0tVLHw (envelope-from ) for ; Fri, 22 May 2020 13:52:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kOakKjHZx150YwAA1q6Kng (envelope-from ) for ; Fri, 22 May 2020 13:52:49 +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 31652940368 for ; Fri, 22 May 2020 13:52:49 +0000 (UTC) Received: from localhost ([::1]:33354 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jc86Q-0007Kr-GZ for larch@yhetil.org; Fri, 22 May 2020 09:52:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jc86J-0007JU-M3 for help-guix@gnu.org; Fri, 22 May 2020 09:52:39 -0400 Received: from sender4-pp-o93.zoho.com ([136.143.188.93]:25328) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jc86I-0002QU-1n for help-guix@gnu.org; Fri, 22 May 2020 09:52:39 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590155554; cv=none; d=zohomail.com; s=zohoarc; b=R26pcrgdlmitTJe/xsAh263PS7TZuZOLq74FucLsT/ysYtE592c4KVpfkk3BNMjhDUwzUfqeBJOpytZ7GPlq6/cdCIJ4JCntmHJpTkewdT2LOIHi4pkwpr4RqHFBJIXH2P8EuyJu30PjM0+UbGnT3I35uVCKWrh7DSagrYKxmIU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590155554; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=CI1ScGjFrmVHLhIwjVn+7SnZh/ZT11PUmMQU4mpu4zA=; b=Ku+zvfHSP+uQGq8KqEa62dx3bTsaNYuFPHOeo1wImVUDKJJfjzqY5hx1k9Im0maIgOJwBTv2pViHKqjYS9aPDkNeIgajgq5GNrFSaVykFaIzONiYi99EaFwpLHME0DUd5FezgBIxrnugVX8eSJuAy9pnMz2AVOvUt/RfJ3f97U4= 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=vqYlHZhpgDXQZZmEIRJE3nyaEf0a5CikQ0Bu74ESIMIm14E4pPzYipL7tM86Iiu9UMlA+dek9lGZ azzQjD/oHk2GYtEysOJW1IbHV79QDrcV5QOsXtVPS+uOsRF4o+tL DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590155554; 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=CI1ScGjFrmVHLhIwjVn+7SnZh/ZT11PUmMQU4mpu4zA=; b=mGYxvULsQbwGU19/YRrAQ6fFWEUenDIVCmXtphl2m0QP9X00o42xA35a5hwixGZL I/Q+gZ7k7nJ1AquRCRD5HR1hYK5sqJYqpyE6+YAtA8r87u1zbF9I7IwO8FXW1p17QgN RVsnwYEKZe1a51Yn1bLN8WoHBDuvbw4Dfiv8UHzY= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1590155547369174.55768661793172; Fri, 22 May 2020 06:52:27 -0700 (PDT) Received: from [179.15.13.185] by mail.zoho.com with HTTP;Fri, 22 May 2020 06:52:27 -0700 (PDT) Date: Fri, 22 May 2020 08:52:27 -0500 From: sirgazil To: "zimoun" Cc: "Marius Bakke" , "Guix Help" Message-ID: <1723ca812e7.101981bc932946.1773075579450045222@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: 7bit 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=mGYxvULs; 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: -2.70 X-TUID: eubI0QYnJ55W ---- On Thu, 21 May 2020 18:02:29 -0500 zimoun wrote ---- > Dear sirgazil, > > On Thu, 21 May 2020 at 22:53, Marius Bakke wrote: > > sirgazil writes: > > > > Hmm, and is there any way for a Guile program installed as a Guix package to use the modules of the Guix obtained by the user with "guix pull" and also being able to take advantage of user-defined channels? Or is this just not possible at all? > > > > You need to add $HOME/.config/guix/current/share/guile/site/3.0 on > > GUILE_LOAD_PATH to access channel code from Guile programs. > > 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. > Well, "guix repl" launches a REPL with the current Guix modules > available and the patch extends that to scripts: "guix repl foo.scm". > Note that '--load-path' is supported so you can extend by your own > modules too. Last, command-line arguments passed to the scripts are > not supported (yet). > > 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. Yes, the script accepts arguments. > Be careful to not mix the modules from the package named 'guix' -- > modules installed with "guix install guix" -- and the modules of the > current Guix -- modules under > ~/.config/guix/current/share/guile/site/3.0. I did the mistake once. > :-) Been there, done that :) Thanks, simon.