1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016 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
33 %store-database-directory
35 %guix-register-program
47 ;;; Compile-time configuration of Guix. When adding a substitution variable
48 ;;; here, make sure to equip (guix scripts pull) to substitute it.
52 (define %guix-package-name
58 (define %guix-bug-report-address
59 "@PACKAGE_BUGREPORT@")
61 (define %guix-home-page-url
67 (define %localstatedir
68 "@guix_localstatedir@")
76 (define %store-directory
77 (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
80 (define %state-directory
81 ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
82 (or (getenv "NIX_STATE_DIR")
83 (string-append %localstatedir "/guix")))
85 (define %store-database-directory
86 (or (and=> (getenv "NIX_DB_DIR") canonicalize-path)
87 (string-append %state-directory "/db")))
89 (define %config-directory
90 ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
91 (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
92 (string-append %sysconfdir "/guix")))
94 (define %guix-register-program
95 ;; The 'guix-register' program.
96 (or (getenv "GUIX_REGISTER")
97 (string-append %sbindir "/guix-register")))
108 (define %nix-instantiate
120 ;;; config.scm ends here