ludo@gnu.org (Ludovic Courtès) writes: >> * guix/build/utils.scm (%store-directory): Fall back to the value of >> %store-directory from (guix config) instead of "/gnu/store". > > This won’t work: (guix config) is meant as a “host-side” module, and > anyway the daemon always defines ‘NIX_STORE’ in the build environment, > so it’s unnecessary. > >> * guix/packages.scm (patch-and-repack): Likewise. > > [...] > >> (define-module (guix packages) >> + #:use-module ((guix config) #:prefix config) >> #:use-module (guix utils) >> #:use-module (guix records) >> #:use-module (guix store) >> @@ -445,7 +446,8 @@ 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 (or (getenv "NIX_STORE") >> + config:%store-directory)) > > This won’t work: the code here is within a gexp, which will run in a > different context where (guix config) is not available. I see, thanks for the explanation! Here's the updated patch, against core-updates: