summaryrefslogtreecommitdiff
path: root/guix/build/union.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build/union.scm')
-rw-r--r--guix/build/union.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/guix/build/union.scm b/guix/build/union.scm
index 82d6199d9e..24b366af45 100644
--- a/guix/build/union.scm
+++ b/guix/build/union.scm
@@ -29,7 +29,8 @@
warn-about-collision
- relative-file-name))
+ relative-file-name
+ symlink-relative))
;;; Commentary:
;;;
@@ -213,4 +214,10 @@ Note that this is from a purely lexical standpoint; conversely, \"..\" is
(finish)))))))
file))
+(define (symlink-relative old new)
+ "Assuming both OLD and NEW are absolute file names, make NEW a symlink to
+OLD, but using a relative file name."
+ (symlink (relative-file-name (dirname new) old)
+ new))
+
;;; union.scm ends here