bug-guix
[Top][All Lists]
Advanced

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

bug#42164: Combining file-append with gexps results in incomprehensible


From: Brian Cully
Subject: bug#42164: Combining file-append with gexps results in incomprehensible errors
Date: Sun, 24 Apr 2022 19:27:11 -0400
User-agent: mu4e 1.6.10; emacs 28.1

Maxime Devos <maximedevos@telenet.be> writes:

Nowhere. I tried implementing 'output', and noticed I just ended up with something equivalent to a simple call to 'gexp-input' (hence, ‘this thing already exists’). 'gexp-input' can be found in (guix
gexp).

I finally had a chance to mess around with this, and it does, indeed, do the job. Since it wasn’t clear to me how it worked, I’d like to document it here.

To accomplish the goal at the begging of this thread, rather than using:
--8<---------------cut here---------------start------------->8---
(file-append #~#$gcc:lib “/lib”)
--8<---------------cut here---------------end--------------->8---

        The “correct” way is this:
--8<---------------cut here---------------start------------->8---
(gexp-input (file-append gcc "/lib") "lib")
--8<---------------cut here---------------end--------------->8---

The name seems a little weird, since we’re selecting an output, but it makes sense from the other end: we’re creating an input for the higher-level expression (in this case, the special-file-services-type).

Anyway, this works for me, so this ticket can probably be closed.

-bjc





reply via email to

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