1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (guix config)
21 #:export (%guix-package-name
23 %guix-bug-report-address
34 %store-database-directory
44 ;;; Compile-time configuration of Guix. When adding a substitution variable
45 ;;; here, make sure to equip (guix scripts pull) to substitute it.
49 (define %guix-package-name
55 (define %guix-bug-report-address
56 "@PACKAGE_BUGREPORT@")
58 (define %guix-home-page-url
61 (define %channel-metadata
62 ;; When true, this is an sexp containing metadata for the 'guix' channel
63 ;; this file was built from. This is used by (guix describe).
64 (let ((url @GUIX_CHANNEL_URL@)
65 (commit @GUIX_CHANNEL_COMMIT@)
66 (intro @GUIX_CHANNEL_INTRODUCTION@))
71 (branch "master") ;XXX: doesn't really matter
79 (signer ,(cdr intro)))))
85 (define %localstatedir
86 "@guix_localstatedir@")
91 (define %store-directory
92 (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
95 (define %state-directory
96 ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
97 (or (getenv "GUIX_STATE_DIRECTORY")
98 (string-append %localstatedir "/guix")))
100 (define %store-database-directory
101 (or (getenv "GUIX_DATABASE_DIRECTORY")
102 (string-append %state-directory "/db")))
104 (define %config-directory
105 ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
106 (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
107 (string-append %sysconfdir "/guix")))
121 ;;; config.scm ends here