From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MDrbLWnRJWXm5gAA9RJhRA:P1 (envelope-from ) for ; Wed, 11 Oct 2023 00:34:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id MDrbLWnRJWXm5gAA9RJhRA (envelope-from ) for ; Wed, 11 Oct 2023 00:34:17 +0200 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 5093F42E30 for ; Wed, 11 Oct 2023 00:34:17 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fabionatali.com header.s=gm1 header.b=OV7FSfYe; dmarc=pass (policy=reject) header.from=fabionatali.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696977257; a=rsa-sha256; cv=none; b=l0FvG4If89xF4ogiAmXjNzZaGnye2Ua/rT8P74ptkWNTP+IJT1kz9ZmNhmdxsQbFIB/ugq yCmDSLOVd7o6vEvt1bnF6fcysIv6JP/W84n6BNCU6Ti/SNwZumyWV+oLYkVLXb1JGz2cVV ZIbQJjKooOugIBiJ7LPFkNjOmxybW+IWRY9KAdnhxgeRRzTiPFgWCetvjf+WDLqpZKDyei m8a6j0vAY1KHFuBunHEA+PE1ujeGc9EgKT0hiXq4YOW/MrqSfgDePUL/JInpryVj19dqyL 4LHPyUpmTm1uuxV5agjssvM9XyLNTqbG6EI2N+rLHS0Ka77xpg+XCI5MQ+wmkQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fabionatali.com header.s=gm1 header.b=OV7FSfYe; dmarc=pass (policy=reject) header.from=fabionatali.com; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696977257; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cEiLmlEdjhiOAZNtIvIGdSyjQ/Rom1Nu0nEknSpo0og=; b=E7NurYEUb6hgGF1iBKsnIDx4jmKXSeeBmUGBIAH0zUXmf6jhHB2O+aHlJv8+qt/h5j8Tyf IMUlpkEN8bQJI0iEFX2wB2RAfCH4abna1AFWVgaZrJ7UEHudGIeO6p1M4s+w7Cq0ghH48M Wz9cXsWP3qFkNYdougU9lhZwvTMN04VSHHeGfvG0C46nWkT5cQRsfbKYY4a1YXoiae0/0r +00MWEu6/vr00dKMYl3L+OWoWU1rmpxtdY5ZnxnAALrAfZbe9/XDiDvqVPCpOwxzjS3BEc PebcqHbod2s8cr9ytSqC1AE3xMugnFs2yMyq5XTkLN/1wKzael8HOjCvOitScA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqLIS-0001lX-6o; Tue, 10 Oct 2023 18:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqLIP-0001ko-SN for help-guix@gnu.org; Tue, 10 Oct 2023 18:33:46 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqLIM-0005cS-UP for help-guix@gnu.org; Tue, 10 Oct 2023 18:33:45 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 45CDB240002 for ; Tue, 10 Oct 2023 22:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1696977219; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type; bh=cEiLmlEdjhiOAZNtIvIGdSyjQ/Rom1Nu0nEknSpo0og=; b=OV7FSfYeyX+EctNshnKGyfNt59nghjlOfEiOWELqE68B3557bqNNLSPtGDCwMecW0M3DQ9 YQ9KqjyrsGy0yc+V34qWfLIrkXANZYSCz7WbiVdxy1I/FmCmDlpmVf+suoMctY4/wvr5TT 9YKGp1APWyWlaygvZkh9Vt7Vrfnp+bY9qN9QqmILS5ePUTXBd2AaDgy0fqsgoFVQor02Pb jGjxx4JTMZGt6F/vcvI/qxnMPHzm2lieXd2FRZXNYQ0eDvxZBGcEGxqGyKXBsMAiSiRz3h IuO37RIjbqMaizxrOtYlOQQxw1FzA5YOtMnBuPrjfc/M6D6yqcNHx8ol5B4HfQ== From: Fabio Natali To: help-guix@gnu.org Subject: Re: G-exp that makes use of guile-ini Date: Tue, 10 Oct 2023 23:33:38 +0100 Message-ID: <877cnup0ot.fsf@fabionatali.com> MIME-Version: 1.0 Content-Type: text/plain X-GND-Sasl: me@fabionatali.com Received-SPF: pass client-ip=217.70.183.193; envelope-from=me@fabionatali.com; helo=relay1-d.mail.gandi.net 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: 87il7epdli.fsf@fabionatali.com Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -4.53 X-Spam-Score: -4.53 X-Migadu-Queue-Id: 5093F42E30 X-TUID: MBlU91X9jAgr Fabio Natali wrote: > I've been struggling with the following g-expression that makes use of > the guile-ini library. Quick update, this works well: #+begin_src scheme :noeval (use-modules (gnu packages guile-xyz) (guix gexp)) (define foo (computed-file "foo" (with-imported-modules '((guix build utils)) (with-extensions (list guile-ini guile-smc guile-lib) #~(begin (use-modules (guix build utils) (ice-9 pretty-print) (ini) (smc core log)) (mkdir-p "/tmp") (smc-log-init! "file" `((file . "/tmp/test"))) (call-with-output-file #$output (lambda (output) (pretty-print (call-with-input-file #$(local-file "/tmp/config.ini") ini->scm) output)))))))) foo #+end_src Now, that was just a stripped down version of what I need to do though! The real gexp uses =(open-pipe* OPEN_READ command ...)= instead, where =command= is a script that calls guile-ini (and therefore guile-smc, and therefore the logger). I can't use =smc-log-init!= the same way then... I'll keep you posted if something comes to mind. Cheers, F.