support building with chicken-install too

Change-Id: I47510ca9d5892f1def55ab14f610ba796a6a6964
This commit is contained in:
puck 2025-11-18 14:04:39 +00:00
parent 933b942a62
commit 56b114ef2c
8 changed files with 55 additions and 10 deletions

View file

@ -5,6 +5,7 @@
(zilch magic) (zilch nix binproto) (zilch nix daemon) (zilch nix drv) (zilch zexpr)
(chicken base) (chicken format)
(srfi 128) (srfi 132) (srfi 146) (srfi 151))
(export zfile zsymlink zdir
z-file? z-directory? z-symlink?
zfile->store)
@ -178,7 +179,7 @@
(write-padding total-len)
(write-bytevector (make-ustar-header #o777 0 #\2)))
;; Serialize the specified structure as a ustar-style (with pax extensions) tape archive to the standard output port. The filename is specified by `name`.
;; Serialize the specified structure as a ustar-style (with pax extensions) tape archive to the current output port. The filename is specified by `name`.
(define (serialize-as-tar f name)
(cond
((z-file? f) (write-pax-file name (z-file-executable f) (z-file-contents f)))
@ -214,10 +215,8 @@
((z-symlink? val) (z-symlink-set-cache val cached)))
cached)
(zexp-add-unquote-handler
(lambda (val)
(if (or (z-file? val) (z-symlink? val) (z-directory? val))
(string-append (zexp-unquote (zfile->store val)) "/-")
#f)))))