unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <marius@gnu.org>
To: Stefan <stefan-guix@vodafonemail.de>, 44525@debbugs.gnu.org
Subject: bug#44525: Derivation of computed-file has no outputs
Date: Sun, 08 Nov 2020 21:44:51 +0100	[thread overview]
Message-ID: <87o8k7fuik.fsf@gnu.org> (raw)
In-Reply-To: <045B8C31-3947-4EA6-8B49-5A3B48F18908@vodafonemail.de>

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]

  reply	other threads:[~2020-11-08 20:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08 20:19 bug#44525: Derivation of computed-file has no outputs Stefan
2020-11-08 20:44 ` Marius Bakke [this message]
2020-11-08 23:38   ` Stefan
2020-11-08 23:45 ` bug#44525: Stefan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8k7fuik.fsf@gnu.org \
    --to=marius@gnu.org \
    --cc=44525@debbugs.gnu.org \
    --cc=stefan-guix@vodafonemail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).