GNU bug report logs - #44525
Derivation of computed-file has no outputs

Previous Next

Package: guix;

Reported by: Stefan <stefan-guix <at> vodafonemail.de>

Date: Sun, 8 Nov 2020 20:20:02 UTC

Severity: normal

Done: Stefan <stefan-guix <at> vodafonemail.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 44525 <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Stefan <stefan-guix <at> vodafonemail.de>, 44525 <at> debbugs.gnu.org
Subject: Re: bug#44525: Derivation of computed-file has no outputs
Date: Sun, 08 Nov 2020 21:44:51 +0100
[Message part 1 (text/plain, inline)]
Stefan <stefan-guix <at> 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?
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.