licenses: Add Free Art License 1.3.
[jackhill/guix/guix.git] / guix / config.scm.in
CommitLineData
233e7676 1;;; GNU Guix --- Functional package management for GNU
316fc2ac 2;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2021 Ludovic Courtès <ludo@gnu.org>
7f9d184d 3;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
00e219d1 4;;;
233e7676 5;;; This file is part of GNU Guix.
00e219d1 6;;;
233e7676 7;;; GNU Guix is free software; you can redistribute it and/or modify it
00e219d1
LC
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;;;
233e7676 12;;; GNU Guix is distributed in the hope that it will be useful, but
00e219d1
LC
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
233e7676 18;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
00e219d1
LC
19
20(define-module (guix config)
21 #:export (%guix-package-name
22 %guix-version
23 %guix-bug-report-address
3441e164 24 %guix-home-page-url
0b0086e9 25
316fc2ac
LC
26 %channel-metadata
27
0b0086e9
LC
28 %storedir
29 %localstatedir
30 %sysconfdir
0b0086e9 31
d8eea3d2
LC
32 %store-directory
33 %state-directory
7f9d184d 34 %store-database-directory
3f40cfde 35 %config-directory
0b0086e9 36
d8eea3d2 37 %system
fe0cff14
LC
38 %gzip
39 %bzip2
40 %xz))
00e219d1
LC
41
42;;; Commentary:
43;;;
13cee334
LC
44;;; Compile-time configuration of Guix. When adding a substitution variable
45;;; here, make sure to equip (guix scripts pull) to substitute it.
00e219d1
LC
46;;;
47;;; Code:
48
49(define %guix-package-name
50 "@PACKAGE_NAME@")
51
52(define %guix-version
53 "@PACKAGE_VERSION@")
54
55(define %guix-bug-report-address
56 "@PACKAGE_BUGREPORT@")
57
3441e164
LC
58(define %guix-home-page-url
59 "@PACKAGE_URL@")
60
316fc2ac
LC
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).
55daad12
LC
64 (let ((url @GUIX_CHANNEL_URL@)
65 (commit @GUIX_CHANNEL_COMMIT@)
66 (intro @GUIX_CHANNEL_INTRODUCTION@))
67 (and url commit
68 `(repository
69 (version 0)
70 (url ,url)
71 (branch "master") ;XXX: doesn't really matter
72 (commit ,commit)
73 (name guix)
74 ,@(if intro
75 `((introduction
76 (channel-introduction
77 (version 0)
78 (commit ,(car intro))
79 (signer ,(cdr intro)))))
80 '())))))
316fc2ac 81
0b0086e9
LC
82(define %storedir
83 "@storedir@")
84
85(define %localstatedir
86 "@guix_localstatedir@")
87
88(define %sysconfdir
89 "@guix_sysconfdir@")
90
d8eea3d2 91(define %store-directory
1d6816f9 92 (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
0b0086e9 93 %storedir))
d8eea3d2
LC
94
95(define %state-directory
03d0e2d2 96 ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
a87d66f3 97 (or (getenv "GUIX_STATE_DIRECTORY")
0b0086e9 98 (string-append %localstatedir "/guix")))
d8eea3d2 99
7f9d184d 100(define %store-database-directory
a87d66f3 101 (or (getenv "GUIX_DATABASE_DIRECTORY")
7f9d184d
CR
102 (string-append %state-directory "/db")))
103
3f40cfde 104(define %config-directory
9dd674db 105 ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
0b0086e9
LC
106 (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
107 (string-append %sysconfdir "/guix")))
3f40cfde 108
d8eea3d2
LC
109(define %system
110 "@guix_system@")
111
fe0cff14
LC
112(define %gzip
113 "@GZIP@")
114
115(define %bzip2
116 "@BZIP2@")
117
118(define %xz
119 "@XZ@")
120
00e219d1 121;;; config.scm ends here