gnu: linux-libre@4.14: Update to 4.14.198.
[jackhill/guix/guix.git] / guix / config.scm.in
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
20 (define-module (guix config)
21 #:export (%guix-package-name
22 %guix-version
23 %guix-bug-report-address
24 %guix-home-page-url
25
26 %storedir
27 %localstatedir
28 %sysconfdir
29
30 %store-directory
31 %state-directory
32 %store-database-directory
33 %config-directory
34
35 %system
36 %gzip
37 %bzip2
38 %xz))
39
40 ;;; Commentary:
41 ;;;
42 ;;; Compile-time configuration of Guix. When adding a substitution variable
43 ;;; here, make sure to equip (guix scripts pull) to substitute it.
44 ;;;
45 ;;; Code:
46
47 (define %guix-package-name
48 "@PACKAGE_NAME@")
49
50 (define %guix-version
51 "@PACKAGE_VERSION@")
52
53 (define %guix-bug-report-address
54 "@PACKAGE_BUGREPORT@")
55
56 (define %guix-home-page-url
57 "@PACKAGE_URL@")
58
59 (define %storedir
60 "@storedir@")
61
62 (define %localstatedir
63 "@guix_localstatedir@")
64
65 (define %sysconfdir
66 "@guix_sysconfdir@")
67
68 (define %store-directory
69 (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
70 %storedir))
71
72 (define %state-directory
73 ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
74 (or (getenv "GUIX_STATE_DIRECTORY")
75 (string-append %localstatedir "/guix")))
76
77 (define %store-database-directory
78 (or (getenv "GUIX_DATABASE_DIRECTORY")
79 (string-append %state-directory "/db")))
80
81 (define %config-directory
82 ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
83 (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
84 (string-append %sysconfdir "/guix")))
85
86 (define %system
87 "@guix_system@")
88
89 (define %gzip
90 "@GZIP@")
91
92 (define %bzip2
93 "@BZIP2@")
94
95 (define %xz
96 "@XZ@")
97
98 ;;; config.scm ends here