From c45477d2a1a651485feede20fe0f3d15aec48b39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 6 Jun 2018 23:58:18 +0200 Subject: install: Use (guix store database) instead of 'guix-register'. * gnu/build/install.scm (register-closure): Add #:reset-timestamps? and and #:schema; honor them. Rewrite in terms of 'register-path'. (populate-single-profile-directory): Add #:schema and honor it. Make /var/guix/profiles and /var/guix/gcroots. * gnu/build/vm.scm (root-partition-initializer): Pass #:reset-timestamps? to 'register-closure'. * gnu/system/vm.scm (not-config?): New procedure. (guile-sqlite3&co): New variable. (expression->derivation-in-linux-vm)[config]: New variable. [builder]: Use 'with-extensions'. (iso9660-image)[schema, config]: New variables. Wrap build expression in 'with-extensions'; add 'sql-schema' call. Remove GUIX from INPUTS. (qemu-image)[schema, config]: New variables. Wrap body in 'with-extensions'. (system-docker-image)[not-config?]: Remove. [config]: Use 'make-config.scm'. [schema]: New variable. [build]: Use 'with-extensions'. Add call to 'sql-schema'. Remove GUIX from INPUTS. * gnu/system/file-systems.scm (%store-prefix): Check whether '%store-prefix' is defined. * guix/scripts/pack.scm (self-contained-tarball)[not-config?] [libgcrypt, schema]: New variables. [build]: Wrap in 'with-extensions'. Adjust imported module list to use 'make-config.scm' for (guix config). --- gnu/system/file-systems.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gnu/system/file-systems.scm') diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 2b5948256a..393dd0df70 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -194,10 +194,15 @@ ;; differs from user to user. (define (%store-prefix) "Return the store prefix." - (cond ((resolve-module '(guix store) #:ensure #f) + ;; Note: If we have (guix store database) in the search path and we do *not* + ;; have (guix store) proper, 'resolve-module' returns an empty (guix store) + ;; with one sub-module. + (cond ((and=> (resolve-module '(guix store) #:ensure #f) + (lambda (store) + (module-variable store '%store-prefix))) => - (lambda (store) - ((module-ref store '%store-prefix)))) + (lambda (variable) + ((variable-ref variable)))) ((getenv "NIX_STORE") => identity) (else -- cgit v1.2.3