Commit | Line | Data |
---|---|---|
233e7676 | 1 | ;;; GNU Guix --- Functional package management for GNU |
72153902 | 2 | ;;; Copyright © 2012, 2013, 2014, 2015, 2016 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 LC |
25 | |
26 | %storedir | |
27 | %localstatedir | |
28 | %sysconfdir | |
29 | %sbindir | |
30 | ||
d8eea3d2 LC |
31 | %store-directory |
32 | %state-directory | |
7f9d184d | 33 | %store-database-directory |
3f40cfde | 34 | %config-directory |
6bfec3ed | 35 | %guix-register-program |
0b0086e9 | 36 | |
d8eea3d2 | 37 | %system |
00e219d1 | 38 | %libgcrypt |
72153902 | 39 | %libz |
fe0cff14 LC |
40 | %nix-instantiate |
41 | %gzip | |
42 | %bzip2 | |
43 | %xz)) | |
00e219d1 LC |
44 | |
45 | ;;; Commentary: | |
46 | ;;; | |
13cee334 LC |
47 | ;;; Compile-time configuration of Guix. When adding a substitution variable |
48 | ;;; here, make sure to equip (guix scripts pull) to substitute it. | |
00e219d1 LC |
49 | ;;; |
50 | ;;; Code: | |
51 | ||
52 | (define %guix-package-name | |
53 | "@PACKAGE_NAME@") | |
54 | ||
55 | (define %guix-version | |
56 | "@PACKAGE_VERSION@") | |
57 | ||
58 | (define %guix-bug-report-address | |
59 | "@PACKAGE_BUGREPORT@") | |
60 | ||
3441e164 LC |
61 | (define %guix-home-page-url |
62 | "@PACKAGE_URL@") | |
63 | ||
0b0086e9 LC |
64 | (define %storedir |
65 | "@storedir@") | |
66 | ||
67 | (define %localstatedir | |
68 | "@guix_localstatedir@") | |
69 | ||
70 | (define %sysconfdir | |
71 | "@guix_sysconfdir@") | |
72 | ||
73 | (define %sbindir | |
74 | "@guix_sbindir@") | |
75 | ||
d8eea3d2 | 76 | (define %store-directory |
1d6816f9 | 77 | (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) |
0b0086e9 | 78 | %storedir)) |
d8eea3d2 LC |
79 | |
80 | (define %state-directory | |
03d0e2d2 | 81 | ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'. |
0b0086e9 LC |
82 | (or (getenv "NIX_STATE_DIR") |
83 | (string-append %localstatedir "/guix"))) | |
d8eea3d2 | 84 | |
7f9d184d CR |
85 | (define %store-database-directory |
86 | (or (and=> (getenv "NIX_DB_DIR") canonicalize-path) | |
87 | (string-append %state-directory "/db"))) | |
88 | ||
3f40cfde | 89 | (define %config-directory |
9dd674db | 90 | ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'. |
0b0086e9 LC |
91 | (or (getenv "GUIX_CONFIGURATION_DIRECTORY") |
92 | (string-append %sysconfdir "/guix"))) | |
3f40cfde | 93 | |
6bfec3ed LC |
94 | (define %guix-register-program |
95 | ;; The 'guix-register' program. | |
0b0086e9 LC |
96 | (or (getenv "GUIX_REGISTER") |
97 | (string-append %sbindir "/guix-register"))) | |
6bfec3ed | 98 | |
d8eea3d2 LC |
99 | (define %system |
100 | "@guix_system@") | |
101 | ||
00e219d1 LC |
102 | (define %libgcrypt |
103 | "@LIBGCRYPT@") | |
104 | ||
72153902 LC |
105 | (define %libz |
106 | "@LIBZ@") | |
107 | ||
00e219d1 LC |
108 | (define %nix-instantiate |
109 | "@NIX_INSTANTIATE@") | |
110 | ||
fe0cff14 LC |
111 | (define %gzip |
112 | "@GZIP@") | |
113 | ||
114 | (define %bzip2 | |
115 | "@BZIP2@") | |
116 | ||
117 | (define %xz | |
118 | "@XZ@") | |
119 | ||
00e219d1 | 120 | ;;; config.scm ends here |