bug-guix
[Top][All Lists]
Advanced

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

bug#44525: Derivation of computed-file has no outputs


From: Marius Bakke
Subject: bug#44525: Derivation of computed-file has no outputs
Date: Sun, 08 Nov 2020 21:44:51 +0100

Stefan <stefan-guix@vodafonemail.de> writes:

> Hi!
>
> I try to use a computed-file as an input to a bootloader profile hook 
> function. Using guix system I get this error message:
>
> guix system: error: reference to invalid output 'out' of derivation 
> '/gnu/store/946szbrwn3ja74yjnibbhjisjflvsk73-test.txt.drv'

>
> This is the simple definition of the computed-file:
>
> (computed-file "test.txt" (with-imported-modules '((guix utils)) 
> #~(%current-system)))

That's expected: this derivation does not produce any outputs.

Assuming you intended to write (%current-system) to test.txt, you can do
something along these lines:

  (computed-file "test.txt"
                 #~(call-with-output-file #$output
                     (lambda (port)
                       (format port #$(%current-system)))))

So I think this is not-a-bug.  WDYT?

Attachment: signature.asc
Description: PGP signature


reply via email to

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