guix-devel
[Top][All Lists]
Advanced

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

Re: Invalid nar signature


From: David Thompson
Subject: Re: Invalid nar signature
Date: Mon, 15 Dec 2014 17:49:53 -0500
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Ludovic Courtès <address@hidden> 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



reply via email to

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