(zilch file): fix unneccessary double-serialization in zfile
Change-Id: I6a6a69640707ff155f425f05aa857f03bad2650d
This commit is contained in:
parent
b5529b2616
commit
ff58095797
1 changed files with 9 additions and 23 deletions
|
|
@ -197,29 +197,15 @@
|
||||||
((z-symlink? val) (z-symlink-cache val))))
|
((z-symlink? val) (z-symlink-cache val))))
|
||||||
(unless cached
|
(unless cached
|
||||||
(set! cached
|
(set! cached
|
||||||
(let*
|
(cdar
|
||||||
((bvport (open-output-bytevector))
|
(store-path-for-ca-drv* "zilchfile" "builtin"
|
||||||
(serialized (zexp-with-context (lambda () (parameterize ((current-output-port bvport)) (serialize-as-tar val "-")))))
|
(zexp ("builtin:unpack-channel"))
|
||||||
(bv (get-output-bytevector bvport))
|
(zexp (("src" . ".attr-1s42g1c76fxb77skzq0b4wdhcrg8jmzb54czmxvh1qm7psgsbcni")
|
||||||
(intermediate #f)
|
("contents" . (zexp-unquote (call-with-port (open-output-bytevector) (lambda (port) (parameterize ((current-output-port port)) (serialize-as-tar val "-")) (get-output-bytevector port)))))
|
||||||
(drv #f))
|
("passAsFile" . "contents")
|
||||||
(close-port bvport)
|
("allowSubstitutes" . "")
|
||||||
;(set! intermediate
|
("channelName" . "-")))
|
||||||
; (zexp-with-injected-context
|
'("out")))))
|
||||||
; (zexp
|
|
||||||
; (zexp-unquote (store-path-for-text "file" bv)))
|
|
||||||
; (cadr serialized)
|
|
||||||
; (car (cddr serialized))))
|
|
||||||
(set! drv
|
|
||||||
(store-path-for-ca-drv* "zilchfile" "builtin"
|
|
||||||
(zexp ("builtin:unpack-channel"))
|
|
||||||
(zexp (("src" . ".attr-1s42g1c76fxb77skzq0b4wdhcrg8jmzb54czmxvh1qm7psgsbcni")
|
|
||||||
("contents" . (zexp-unquote (call-with-port (open-output-bytevector) (lambda (port) (parameterize ((current-output-port port)) (serialize-as-tar val "-")) (get-output-bytevector port)))))
|
|
||||||
("passAsFile" . "contents")
|
|
||||||
("allowSubstitutes" . "")
|
|
||||||
("channelName" . "-")))
|
|
||||||
'("out")))
|
|
||||||
(cdar drv))))
|
|
||||||
(cond
|
(cond
|
||||||
((z-file? val) (z-file-set-cache val cached))
|
((z-file? val) (z-file-set-cache val cached))
|
||||||
((z-directory? val) (z-directory-set-cache val cached))
|
((z-directory? val) (z-directory-set-cache val cached))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue