Remove 'guix-register' and its traces.
[jackhill/guix/guix.git] / guix / config.scm.in
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 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 %libgcrypt
37 %libz
38 %nix-instantiate
39 %gzip
40 %bzip2
41 %xz))
42
43 ;;; Commentary:
44 ;;;
45 ;;; Compile-time configuration of Guix. When adding a substitution variable
46 ;;; here, make sure to equip (guix scripts pull) to substitute it.
47 ;;;
48 ;;; Code:
49
50 (define %guix-package-name
51 "@PACKAGE_NAME@")
52
53 (define %guix-version
54 "@PACKAGE_VERSION@")
55
56 (define %guix-bug-report-address
57 "@PACKAGE_BUGREPORT@")
58
59 (define %guix-home-page-url
60 "@PACKAGE_URL@")
61
62 (define %storedir
63 "@storedir@")
64
65 (define %localstatedir
66 "@guix_localstatedir@")
67
68 (define %sysconfdir
69 "@guix_sysconfdir@")
70
71 (define %store-directory
72 (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
73 %storedir))
74
75 (define %state-directory
76 ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
77 (or (getenv "NIX_STATE_DIR")
78 (string-append %localstatedir "/guix")))
79
80 (define %store-database-directory
81 (or (getenv "NIX_DB_DIR")
82 (string-append %state-directory "/db")))
83
84 (define %config-directory
85 ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
86 (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
87 (string-append %sysconfdir "/guix")))
88
89 (define %system
90 "@guix_system@")
91
92 (define %libgcrypt
93 "@LIBGCRYPT@")
94
95 (define %libz
96 "@LIBZ@")
97
98 (define %nix-instantiate
99 "@NIX_INSTANTIATE@")
100
101 (define %gzip
102 "@GZIP@")
103
104 (define %bzip2
105 "@BZIP2@")
106
107 (define %xz
108 "@XZ@")
109
110 ;;; config.scm ends here