aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/derivations.scm3
-rw-r--r--tests/derivations.scm3
2 files changed, 4 insertions, 2 deletions
diff --git a/guix/derivations.scm b/guix/derivations.scm
index 47023f566c..9f5ab16d6d 100644
--- a/guix/derivations.scm
+++ b/guix/derivations.scm
@@ -412,7 +412,8 @@ system, imported, and appears under FINAL-PATH in the resulting store path."
`(false-if-exception
(mkdir ,d)))
head)
- `((mkdir ,tail)))))
+ `((or (file-exists? ,tail)
+ (mkdir ,tail))))))
`((symlink ,store-path ,final-path)))))
files))))
(build-expression->derivation store name (%current-system)
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 3f48289380..d39dacd9a0 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -221,7 +221,8 @@
(let* ((files `(("x" . ,(search-path %load-path "ice-9/q.scm"))
("a/b/c" . ,(search-path %load-path
"guix/derivations.scm"))
- ("p/q" . ,(search-path %load-path "guix.scm"))))
+ ("p/q" . ,(search-path %load-path "guix.scm"))
+ ("p/z" . ,(search-path %load-path "guix/store.scm"))))
(drv-path (imported-files %store files)))
(and (build-derivations %store (list drv-path))
(let ((dir (derivation-path->output-path drv-path)))