all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Thompson <dthompson2@worcester.edu>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Invalid nar signature
Date: Mon, 15 Dec 2014 17:49:53 -0500	[thread overview]
Message-ID: <87ppbkedf2.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87ppbkfw4w.fsf@gnu.org>

Ludovic Courtès <ludo@gnu.org> writes:

> To produce that, use ‘write-file’ from (guix serialization):
>
> --8<---------------cut here---------------start------------->8---
> $ ./pre-inst-env guile -c '(use-modules (guix serialization)) (write-file "/gnu/store/wy70n5zk8qinxjz0wdk9q2hh1zjfb32j-miscfiles-1.5" (current-output-port))' > t.nar
> $ ./pre-inst-env guile -c '(use-modules (guix serialization)) (call-with-input-file "t.nar" (lambda (port) (restore-file port "restored")))'
> $ ls restored/
> share
> --8<---------------cut here---------------end--------------->8---

The above snippet works.  However, 'guix substitute-binary' throws the
following error:

  guix substitute-binary: error: invalid nar end-of-file marker

Here's my nar rendering code:

  (define (render-nar store-item)
    "Render archive of the store path corresponding to STORE-ITEM."
    (let ((store-path (string-append %store-directory "/" store-item)))
      (values '((content-type . (text/x-nix-archive)))
              (lambda (port)
                (write-file store-path port)))))

Thoughts?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

  parent reply	other threads:[~2014-12-15 22:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  2:22 Invalid nar signature David Thompson
2014-12-15  2:33 ` David Thompson
2014-12-15 17:19 ` Ludovic Courtès
2014-12-15 20:08   ` Thompson, David
2014-12-15 21:20     ` Ludovic Courtès
2014-12-15 21:24       ` Thompson, David
2014-12-15 22:49       ` David Thompson [this message]
2014-12-16 17:07         ` Ludovic Courtès
2015-01-15  2:38           ` David Thompson
2015-01-15  9:51             ` Ludovic Courtès
2015-01-15 13:39               ` Thompson, David
2015-01-15 16:22                 ` Ludovic Courtès
2015-01-15 17:23                   ` Thompson, David

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

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

  git send-email \
    --in-reply-to=87ppbkedf2.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.