mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
config: Export the raw installation directories.
* guix/config.scm.in (%storedir, %localstatedir) (%sysconfdir, %sbindir): New variables. (%store-directory): Use %STOREDIR. (%state-directory): Use %LOCALSTATEDIR. (%config-directory): Use %SYSCONFDIR. (%guix-register-program): Use %SBINDIR.
This commit is contained in:
parent
cdf8f39195
commit
0b0086e94c
1 changed files with 26 additions and 4 deletions
|
@ -21,10 +21,17 @@ (define-module (guix config)
|
|||
%guix-version
|
||||
%guix-bug-report-address
|
||||
%guix-home-page-url
|
||||
|
||||
%storedir
|
||||
%localstatedir
|
||||
%sysconfdir
|
||||
%sbindir
|
||||
|
||||
%store-directory
|
||||
%state-directory
|
||||
%config-directory
|
||||
%guix-register-program
|
||||
|
||||
%system
|
||||
%libgcrypt
|
||||
%libz
|
||||
|
@ -51,21 +58,36 @@ (define %guix-bug-report-address
|
|||
(define %guix-home-page-url
|
||||
"@PACKAGE_URL@")
|
||||
|
||||
(define %storedir
|
||||
"@storedir@")
|
||||
|
||||
(define %localstatedir
|
||||
"@guix_localstatedir@")
|
||||
|
||||
(define %sysconfdir
|
||||
"@guix_sysconfdir@")
|
||||
|
||||
(define %sbindir
|
||||
"@guix_sbindir@")
|
||||
|
||||
(define %store-directory
|
||||
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
|
||||
"@storedir@"))
|
||||
%storedir))
|
||||
|
||||
(define %state-directory
|
||||
;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
|
||||
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix"))
|
||||
(or (getenv "NIX_STATE_DIR")
|
||||
(string-append %localstatedir "/guix")))
|
||||
|
||||
(define %config-directory
|
||||
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
|
||||
(or (getenv "GUIX_CONFIGURATION_DIRECTORY") "@guix_sysconfdir@/guix"))
|
||||
(or (getenv "GUIX_CONFIGURATION_DIRECTORY")
|
||||
(string-append %sysconfdir "/guix")))
|
||||
|
||||
(define %guix-register-program
|
||||
;; The 'guix-register' program.
|
||||
(or (getenv "GUIX_REGISTER") "@guix_sbindir@/guix-register"))
|
||||
(or (getenv "GUIX_REGISTER")
|
||||
(string-append %sbindir "/guix-register")))
|
||||
|
||||
(define %system
|
||||
"@guix_system@")
|
||||
|
|
Loading…
Reference in a new issue