self: Define derived '-directory' variables in config.scm.
This is a followup to d6b5aa0b03
.
* guix/self.scm (%config-variables): Remove %CONFIG-DIRECTORY,
%STATE-DIRECTORY, %STORE-DATABASE-DIRECTORY, and %STORE-DIRECTORY.
(make-config.scm): Define them here.
* build-aux/build-self.scm (%config-variables, make-config.scm):
Likewise.
This commit is contained in:
parent
d6b5aa0b03
commit
7af5c2a248
|
@ -70,11 +70,7 @@
|
||||||
((_ variable rest ...)
|
((_ variable rest ...)
|
||||||
(cons `(variable . ,variable)
|
(cons `(variable . ,variable)
|
||||||
(variables rest ...))))))
|
(variables rest ...))))))
|
||||||
(variables %config-directory %localstatedir %state-directory
|
(variables %localstatedir %storedir %sysconfdir %system)))
|
||||||
;; Note: No '%store-database-directory', which is too recent
|
|
||||||
;; and unnecessary anyway.
|
|
||||||
%store-directory
|
|
||||||
%storedir %sysconfdir %system)))
|
|
||||||
|
|
||||||
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
||||||
(package-name "GNU Guix")
|
(package-name "GNU Guix")
|
||||||
|
@ -92,6 +88,10 @@
|
||||||
%guix-version
|
%guix-version
|
||||||
%guix-bug-report-address
|
%guix-bug-report-address
|
||||||
%guix-home-page-url
|
%guix-home-page-url
|
||||||
|
%store-directory
|
||||||
|
%state-directory
|
||||||
|
%store-database-directory
|
||||||
|
%config-directory
|
||||||
%libgcrypt
|
%libgcrypt
|
||||||
%libz
|
%libz
|
||||||
%gzip
|
%gzip
|
||||||
|
@ -105,6 +105,26 @@
|
||||||
#~(define-public #$name #$value)))
|
#~(define-public #$name #$value)))
|
||||||
%config-variables)
|
%config-variables)
|
||||||
|
|
||||||
|
(define %store-directory
|
||||||
|
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
|
||||||
|
%storedir))
|
||||||
|
|
||||||
|
(define %state-directory
|
||||||
|
;; This must match `NIX_STATE_DIR' as defined in
|
||||||
|
;; `nix/local.mk'.
|
||||||
|
(or (getenv "NIX_STATE_DIR")
|
||||||
|
(string-append %localstatedir "/guix")))
|
||||||
|
|
||||||
|
(define %store-database-directory
|
||||||
|
(or (getenv "NIX_DB_DIR")
|
||||||
|
(string-append %state-directory "/db")))
|
||||||
|
|
||||||
|
(define %config-directory
|
||||||
|
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as
|
||||||
|
;; defined in `nix/local.mk'.
|
||||||
|
(or (getenv "GUIX_CONFIGURATION_DIRECTORY")
|
||||||
|
(string-append %sysconfdir "/guix")))
|
||||||
|
|
||||||
(define %guix-package-name #$package-name)
|
(define %guix-package-name #$package-name)
|
||||||
(define %guix-version #$package-version)
|
(define %guix-version #$package-version)
|
||||||
(define %guix-bug-report-address #$bug-report-address)
|
(define %guix-bug-report-address #$bug-report-address)
|
||||||
|
|
|
@ -672,9 +672,7 @@ assumed to be part of MODULES."
|
||||||
((_ variable rest ...)
|
((_ variable rest ...)
|
||||||
(cons `(variable . ,variable)
|
(cons `(variable . ,variable)
|
||||||
(variables rest ...))))))
|
(variables rest ...))))))
|
||||||
(variables %config-directory %localstatedir %state-directory
|
(variables %localstatedir %storedir %sysconfdir %system)))
|
||||||
%store-database-directory %store-directory
|
|
||||||
%storedir %sysconfdir %system)))
|
|
||||||
|
|
||||||
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
(define* (make-config.scm #:key libgcrypt zlib gzip xz bzip2
|
||||||
(package-name "GNU Guix")
|
(package-name "GNU Guix")
|
||||||
|
@ -692,6 +690,10 @@ assumed to be part of MODULES."
|
||||||
%guix-version
|
%guix-version
|
||||||
%guix-bug-report-address
|
%guix-bug-report-address
|
||||||
%guix-home-page-url
|
%guix-home-page-url
|
||||||
|
%store-directory
|
||||||
|
%state-directory
|
||||||
|
%store-database-directory
|
||||||
|
%config-directory
|
||||||
%libgcrypt
|
%libgcrypt
|
||||||
%libz
|
%libz
|
||||||
%gzip
|
%gzip
|
||||||
|
@ -703,6 +705,26 @@ assumed to be part of MODULES."
|
||||||
#~(define-public #$name #$value)))
|
#~(define-public #$name #$value)))
|
||||||
%config-variables)
|
%config-variables)
|
||||||
|
|
||||||
|
(define %store-directory
|
||||||
|
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
|
||||||
|
%storedir))
|
||||||
|
|
||||||
|
(define %state-directory
|
||||||
|
;; This must match `NIX_STATE_DIR' as defined in
|
||||||
|
;; `nix/local.mk'.
|
||||||
|
(or (getenv "NIX_STATE_DIR")
|
||||||
|
(string-append %localstatedir "/guix")))
|
||||||
|
|
||||||
|
(define %store-database-directory
|
||||||
|
(or (getenv "NIX_DB_DIR")
|
||||||
|
(string-append %state-directory "/db")))
|
||||||
|
|
||||||
|
(define %config-directory
|
||||||
|
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as
|
||||||
|
;; defined in `nix/local.mk'.
|
||||||
|
(or (getenv "GUIX_CONFIGURATION_DIRECTORY")
|
||||||
|
(string-append %sysconfdir "/guix")))
|
||||||
|
|
||||||
(define %guix-package-name #$package-name)
|
(define %guix-package-name #$package-name)
|
||||||
(define %guix-version #$package-version)
|
(define %guix-version #$package-version)
|
||||||
(define %guix-bug-report-address #$bug-report-address)
|
(define %guix-bug-report-address #$bug-report-address)
|
||||||
|
|
Loading…
Reference in New Issue