store: Add a printer for <nix-server>.

* guix/store.scm (<nix-server>): Set a printer.
This commit is contained in:
Ludovic Courtès 2013-09-01 19:24:21 +02:00
parent d91712ee89
commit bf8e7fc502

@ -25,6 +25,7 @@
#:use-module (rnrs io ports)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
#:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-35)
@ -242,6 +243,14 @@
(ats-cache nix-server-add-to-store-cache)
(atts-cache nix-server-add-text-to-store-cache))
(set-record-type-printer! <nix-server>
(lambda (obj port)
(format port "#<build-daemon ~a.~a ~a>"
(nix-server-major-version obj)
(nix-server-minor-version obj)
(number->string (object-address obj)
16))))
(define-condition-type &nix-error &error
nix-error?)