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 YBuCOVboxl6gKwAA0tVLHw (envelope-from ) for ; Thu, 21 May 2020 20:45:10 +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 SKZFNVboxl5iIgAAbx9fmQ (envelope-from ) for ; Thu, 21 May 2020 20:45:10 +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 6BE4394036C for ; Thu, 21 May 2020 20:45:10 +0000 (UTC) Received: from localhost ([::1]:37148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbs3x-0005un-C7 for larch@yhetil.org; Thu, 21 May 2020 16:45:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47308) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbs2x-00041e-8Y for help-guix@gnu.org; Thu, 21 May 2020 16:44:07 -0400 Received: from sender4-pp-o93.zoho.com ([136.143.188.93]:25302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jbs2w-0000Nr-7y for help-guix@gnu.org; Thu, 21 May 2020 16:44:06 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590093843; cv=none; d=zohomail.com; s=zohoarc; b=CYQHh+Be5olnhuI1XpcM8HpGz2Rz0gR9DQqZQj32brHTFjFDkHRMxMvbuIawKMCYHwiofXIz7S4xAN/PV/WDmSrJ8UUxPmHrYx5y5EedC0Y6G/C6U79tw7YelORdUMb2A1u/tvbmW3SrdpULUUciVzajPcruFZot3GYsha/BBxc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590093843; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=1ed6J5qB349T6SerO41Lw4/ZAkgLgJFWna0ius355DQ=; b=FUvzZYANIvzC+bPs27DK4GED/aAo5SDXDzNNgWbgHtA9zxm+bwNgR5+ZZazG5dcNsUErgXftQIWvlTc589SuLzT9D0cHuAwmT/uokawSEuKR2Z++sXgDwyblLyh4ZddLT2xPYKroH+zWB891mwt5SlkXt6xLX98NssPKNy41kF8= 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=FouGTra7mASgtDh57XxktrZ8yyBEi03rFpB9v6UJyvyAyWvlIa/8e9+MCsXdJproMq3G5/M5DB/F 9x04D1UT1uxzyY7Q2Drlu8j6NFjribfOuXa6jS2UuxhXRnbp4JoU DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590093843; 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=1ed6J5qB349T6SerO41Lw4/ZAkgLgJFWna0ius355DQ=; b=SWcyUiQjPDZCoqdvuM1FEm2w4YaElkrV70FiN3TEo5B8c2qTAzqObwEBa7dhmJ0v ORU3yqmB26x8EujaW8f8aZqj75tLhCcgIaZCqmdCMBXxIos/P0rskai1h8bemsvrHnW 188tVgZdAsR3sOft0JHRY7qJuojj//MYtaX2D3Uo= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1590093836097184.1748676236581; Thu, 21 May 2020 13:43:56 -0700 (PDT) Received: from [179.15.13.185] by mail.zoho.com with HTTP;Thu, 21 May 2020 13:43:56 -0700 (PDT) Date: Thu, 21 May 2020 15:43:56 -0500 From: sirgazil To: "Marius Bakke" Cc: "Guix Help" Message-ID: <17238fa6f3f.1085042d523521.3962992471488424781@zoho.com> In-Reply-To: <878shla245.fsf@devup.no> References: <17234059da3.b5e01d1e8240.9032082708652182693@zoho.com> <878shla245.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/21 16:44:04 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=SWcyUiQj; 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: YzTJ/O0kUW7d The error is gone after reconfiguring, but I still have a question about us= ing Guix API from a Guile script. ---- On Thu, 21 May 2020 07:44:58 -0500 Marius Bakke = wrote ---- > sirgazil writes: >=20 > > Hi, > > > > I use Guix's GNU system.=20 > > > > I had written a Guile script that called Guix procedures to manipulate= profiles. I put it in a Guix package in a custom channel and installed it.= It used to work, but now it fails with an error I can also reproduce when = trying to do something similar from a Guile REPL. For instance: > > > > =E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98= =85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85= =E2=98=85=E2=98=85=E2=98=85=E2=98=85 > > $ mkdir profile-x > > $ guile > > GNU Guile 3.0.2 > > [...] > > scheme@(guile-user)> (use-modules (guix scripts package)) > > scheme@(guile-user)> (guix-package "-m" "manifest.scm" "-p" "profile-x= /profile-x") > > error: glibc-bootstrap-system-2.2.5.patch: patch not found > > =E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98= =85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85= =E2=98=85=E2=98=85=E2=98=85=E2=98=85 >=20 > There are a couple of things going on here. Calling the Guix APIs from > Guile will use the 'system-installed' Guix, unless you have fiddled with > GUILE_LOAD_PATH. Hmm, and is there any way for a Guile program installed as a Guix package t= o use the modules of the Guix obtained by the user with "guix pull" and als= o being able to take advantage of user-defined channels? Or is this just no= t possible at all? Because I just tried creating a profile using my script and a manifest that= includes one package from a custom channel of mine, and, as expected, I ge= t an error: =E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2= =98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98= =85=E2=98=85=E2=98=85=E2=98=85 error: guile-glab: unknown package error: failed to load 'requirements/guix.scm': gnu/packages.scm:523:4: In procedure specification->package+output: Throw to key `quit' with args `(1)'. =E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2= =98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98=85=E2=98= =85=E2=98=85=E2=98=85=E2=98=85