build-system: copy-build-system: Keep symlinks symbolic.

guix/build/copy-build-system.scm (install)[install-file]:
Read symlinks as is done in install-simple through copy-recursively.

Signed-off-by: Pierre Neidhardt <mail@ambrevar.xyz>
This commit is contained in:
Leo Prikler 2020-02-27 14:49:11 +01:00 committed by Pierre Neidhardt
parent 2e76ddd67f
commit a3b1f878df
No known key found for this signature in database
GPG key ID: 9BDCF497A4BBCC7F

View file

@ -91,7 +91,13 @@ (define (install-file file target)
file))))
(format (current-output-port) "`~a' -> `~a'~%" file dest)
(mkdir-p (dirname dest))
(copy-file file dest)))
(let ((stat (lstat file)))
(case (stat:type stat)
((symlink)
(let ((target (readlink file)))
(symlink target dest)))
(else
(copy-file file dest))))))
(define* (make-file-predicate suffixes matches-regexp #:optional (default-value #t))
"Return a predicate that returns #t if its file argument matches the