diff --git a/guix/packages.scm b/guix/packages.scm index a979f31a32..f6dda451ad 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -466,7 +466,7 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET." ;; SOURCE may be either a directory or a tarball. (and (if (file-is-directory? #+source) - (let* ((store (or (getenv "NIX_STORE") "/gnu/store")) + (let* ((store (%store-directory)) (len (+ 1 (string-length store))) (base (string-drop #+source len)) (dash (string-index base #\-))