aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/packages.scm2
-rw-r--r--tests/packages.scm11
2 files changed, 12 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index d4a295e3ac..b25cc52bba 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -413,7 +413,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
#:guile-for-build (or guile-for-build
(%guile-for-build)
(default-guile store system)))))
- ((and (? string?) (? store-path?) file)
+ ((and (? string?) (? direct-store-path?) file)
file)
((? string? file)
(add-to-store store (basename file) #t "sha256" file))))
diff --git a/tests/packages.scm b/tests/packages.scm
index 7c5dd9f4e1..b499c380ce 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -122,6 +122,17 @@
(package-source package))))
(string=? file source)))
+(test-assert "package-source-derivation, indirect store path"
+ (let* ((dir (add-to-store %store "guix-build" #t "sha256"
+ (dirname (search-path %load-path
+ "guix/build/utils.scm"))))
+ (package (package (inherit (dummy-package "p"))
+ (source (string-append dir "/utils.scm"))))
+ (source (package-source-derivation %store
+ (package-source package))))
+ (and (direct-store-path? source)
+ (string-suffix? "utils.scm" source))))
+
(test-equal "package-source-derivation, snippet"
"OK"
(let* ((file (search-bootstrap-binary "guile-2.0.7.tar.xz"