mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
config: Export '%config-directory'.
* configure.ac: Define and substitute 'guix_sysconfdir'. * guix/config.scm.in (%config-directory): New variable.
This commit is contained in:
parent
04d4c8a439
commit
3f40cfdece
2 changed files with 8 additions and 1 deletions
|
@ -36,10 +36,12 @@ AC_ARG_ENABLE([daemon],
|
|||
[guix_build_daemon="$enableval"],
|
||||
[guix_build_daemon="yes"])
|
||||
|
||||
# Prepare a version of $localstatedir that does not contain references
|
||||
# Prepare a version of $localstatedir & co. that does not contain references
|
||||
# to shell variables.
|
||||
guix_localstatedir="`eval echo $localstatedir | sed -e "s|NONE|/usr/local|g"`"
|
||||
guix_sysconfdir="`eval echo $sysconfdir | sed -e "s|NONE|/usr/local|g"`"
|
||||
AC_SUBST([guix_localstatedir])
|
||||
AC_SUBST([guix_sysconfdir])
|
||||
|
||||
dnl We require the pkg.m4 set of macros from pkg-config.
|
||||
dnl Make sure it's available.
|
||||
|
|
|
@ -23,6 +23,7 @@ (define-module (guix config)
|
|||
%guix-home-page-url
|
||||
%store-directory
|
||||
%state-directory
|
||||
%config-directory
|
||||
%system
|
||||
%libgcrypt
|
||||
%nixpkgs
|
||||
|
@ -56,6 +57,10 @@ (define %state-directory
|
|||
;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
|
||||
"@guix_localstatedir@/nix")
|
||||
|
||||
(define %config-directory
|
||||
;; This must match `NIX_CONF_DIR' as defined in `daemon.am'.
|
||||
(or (getenv "NIX_CONF_DIR") "@guix_sysconfdir@/guix"))
|
||||
|
||||
(define %system
|
||||
"@guix_system@")
|
||||
|
||||
|
|
Loading…
Reference in a new issue