From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: Re: Invalid nar signature Date: Mon, 15 Dec 2014 17:49:53 -0500 Message-ID: <87ppbkedf2.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87zjapejo3.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> <87ppbkompf.fsf@gnu.org> <87ppbkfw4w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0eSi-0006XA-JK for guix-devel@gnu.org; Mon, 15 Dec 2014 17:49:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0eSh-0001ig-N1 for guix-devel@gnu.org; Mon, 15 Dec 2014 17:49:56 -0500 In-Reply-To: <87ppbkfw4w.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel Ludovic Court=C3=A8s writes: > To produce that, use =E2=80=98write-file=E2=80=99 from (guix serializatio= n): > > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guile -c '(use-modules (guix serialization)) (write-file= "/gnu/store/wy70n5zk8qinxjz0wdk9q2hh1zjfb32j-miscfiles-1.5" (current-outpu= t-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? --=20 David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate