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
1 changed files with 7 additions and 1 deletions

View File

@ -91,7 +91,13 @@ if TARGET ends with a '/', the source is installed underneath."
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