@@ -206,18 +206,25 @@ (define-module (guix store)
derivation-log-file
log-file))
-(define %protocol-version #x164)
+(define-public %protocol-version #x164)
-(define %worker-magic-1 #x6e697863) ; "nixc"
-(define %worker-magic-2 #x6478696f) ; "dxio"
+(define-public %worker-magic-1 #x6e697863) ; "nixc"
+(define-public %worker-magic-2 #x6478696f) ; "dxio"
-(define (protocol-major magic)
+(define-public (protocol-major magic)
(logand magic #xff00))
-(define (protocol-minor magic)
+(define-public (protocol-minor magic)
(logand magic #x00ff))
-(define (protocol-version major minor)
+(define-public (protocol-version major minor)
(logior major minor))
+;; magic cookies from worker-protocol.hh
+(define-public %stderr-next #x6f6c6d67) ; "olmg", build log
+(define-public %stderr-read #x64617461) ; "data", data needed from source
+(define-public %stderr-write #x64617416) ; "dat\x16", data for sink
+(define-public %stderr-last #x616c7473) ; "alts", we're done
+(define-public %stderr-error #x63787470) ; "cxtp", error reporting
+
(define-syntax define-enumerate-type
(syntax-rules ()
((_ name->int (name id) ...)
@@ -709,13 +716,6 @@ (define* (process-stderr server #:optional user-port)
(define p
(store-connection-socket server))
- ;; magic cookies from worker-protocol.hh
- (define %stderr-next #x6f6c6d67) ; "olmg", build log
- (define %stderr-read #x64617461) ; "data", data needed from source
- (define %stderr-write #x64617416) ; "dat\x16", data for sink
- (define %stderr-last #x616c7473) ; "alts", we're done
- (define %stderr-error #x63787470) ; "cxtp", error reporting
-
(let ((k (read-int p)))
(cond ((= k %stderr-write)
;; Write a byte stream to USER-PORT.