[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: G-exp that makes use of guile-ini

From: Artyom V. Poptsov
Subject: Re: G-exp that makes use of guile-ini
Date: Wed, 11 Oct 2023 10:03:42 +0300
User-agent: Mozilla Thunderbird


FWIW, there was a similar issue with Guile-DSV:

The difference is that Guile-DSV API allows to set the Guile-SMC logging driver

and its options.

I've added the same functionality to the Guile-INI API:

Please check if it works for you.


- avp

On 11.10.2023 01:33, Fabio Natali wrote:
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
    (with-imported-modules '((guix build utils))
      (with-extensions (list guile-ini guile-smc guile-lib)
            (use-modules (guix build utils)
                        (ice-9 pretty-print)
                        (smc core log))
           (mkdir-p "/tmp")
           (smc-log-init! "file" `((file . "/tmp/test")))
           (call-with-output-file #$output
             (lambda (output)
                (call-with-input-file #$(local-file "/tmp/config.ini")


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.

Attachment: OpenPGP_0xE9C5A2D90898A02F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]