From 7147b298949e17b3b3af857d91437f9012149297 Mon Sep 17 00:00:00 2001 From: Leo Prikler
Date: Thu, 27 Feb 2020 14:49:11 +0100 Subject: [PATCH 1/2] 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. --- guix/build/copy-build-system.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guix/build/copy-build-system.scm b/guix/build/copy-build-system.scm index 6d9dc8f93b..a86f0cde29 100644 --- a/guix/build/copy-build-system.scm +++ b/guix/build/copy-build-system.scm @@ -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 -- 2.25.1