2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2019-02-03 22:10:06 +01:00
|
|
|
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
|
2018-05-27 19:19:30 +02:00
|
|
|
;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
|
2012-11-03 21:07:52 +01:00
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; This file is part of GNU Guix.
|
2012-11-03 21:07:52 +01:00
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
2012-11-03 21:07:52 +01:00
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
2012-11-03 21:07:52 +01:00
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
2013-01-06 00:47:50 +01:00
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
2012-11-03 21:07:52 +01:00
|
|
|
|
|
|
|
(define-module (guix config)
|
|
|
|
#:export (%guix-package-name
|
|
|
|
%guix-version
|
|
|
|
%guix-bug-report-address
|
2013-01-05 15:55:47 +01:00
|
|
|
%guix-home-page-url
|
2016-07-20 19:27:32 +02:00
|
|
|
|
|
|
|
%storedir
|
|
|
|
%localstatedir
|
|
|
|
%sysconfdir
|
|
|
|
|
2012-12-05 23:02:47 +01:00
|
|
|
%store-directory
|
|
|
|
%state-directory
|
2018-05-27 19:19:30 +02:00
|
|
|
%store-database-directory
|
2013-12-29 15:52:50 +01:00
|
|
|
%config-directory
|
2016-07-20 19:27:32 +02:00
|
|
|
|
2012-12-05 23:02:47 +01:00
|
|
|
%system
|
2016-07-18 23:14:14 +02:00
|
|
|
%libz
|
2019-03-08 19:02:59 +01:00
|
|
|
%liblz
|
2013-04-12 17:30:27 +02:00
|
|
|
%gzip
|
|
|
|
%bzip2
|
|
|
|
%xz))
|
2012-11-03 21:07:52 +01:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
pull: Install (guix config) module to override the user's one.
* build-aux/build-self.scm (zlib, gzip, bzip2, xz): New variables.
(build)[storedir, localstatedir, sysconfdir, sbindir]: New variables.
[builder]: Pass them to 'build-guix'.
* guix/build/pull.scm (build-guix): Add #:system, #:storedir,
#:localstatedir, #:sysconfdir, #:sbindir, #:package-name,
#:package-version, #:bug-report-address, #:home-page-url, #:libgcrypt,
#:zlib, #:gzip, #:bzip2, and #:xz. Remove #:gcrypt.
Instantiate all the substitution variables in (guix config). Remove
code to delete OUT/guix/config.{scm,go}.
* guix/config.scm.in: Add note about (guix script pull).
2016-07-20 22:23:15 +02:00
|
|
|
;;; Compile-time configuration of Guix. When adding a substitution variable
|
|
|
|
;;; here, make sure to equip (guix scripts pull) to substitute it.
|
2012-11-03 21:07:52 +01:00
|
|
|
;;;
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(define %guix-package-name
|
|
|
|
"@PACKAGE_NAME@")
|
|
|
|
|
|
|
|
(define %guix-version
|
|
|
|
"@PACKAGE_VERSION@")
|
|
|
|
|
|
|
|
(define %guix-bug-report-address
|
|
|
|
"@PACKAGE_BUGREPORT@")
|
|
|
|
|
2013-01-05 15:55:47 +01:00
|
|
|
(define %guix-home-page-url
|
|
|
|
"@PACKAGE_URL@")
|
|
|
|
|
2016-07-20 19:27:32 +02:00
|
|
|
(define %storedir
|
|
|
|
"@storedir@")
|
|
|
|
|
|
|
|
(define %localstatedir
|
|
|
|
"@guix_localstatedir@")
|
|
|
|
|
|
|
|
(define %sysconfdir
|
|
|
|
"@guix_sysconfdir@")
|
|
|
|
|
2012-12-05 23:02:47 +01:00
|
|
|
(define %store-directory
|
2014-01-08 21:37:06 +01:00
|
|
|
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
|
2016-07-20 19:27:32 +02:00
|
|
|
%storedir))
|
2012-12-05 23:02:47 +01:00
|
|
|
|
|
|
|
(define %state-directory
|
2016-04-21 18:07:52 +02:00
|
|
|
;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
|
2019-02-03 22:10:06 +01:00
|
|
|
(or (getenv "GUIX_STATE_DIRECTORY")
|
2016-07-20 19:27:32 +02:00
|
|
|
(string-append %localstatedir "/guix")))
|
2012-12-05 23:02:47 +01:00
|
|
|
|
2018-05-27 19:19:30 +02:00
|
|
|
(define %store-database-directory
|
2019-02-03 22:10:06 +01:00
|
|
|
(or (getenv "GUIX_DATABASE_DIRECTORY")
|
2018-05-27 19:19:30 +02:00
|
|
|
(string-append %state-directory "/db")))
|
|
|
|
|
2013-12-29 15:52:50 +01:00
|
|
|
(define %config-directory
|
2016-06-23 19:44:38 +02:00
|
|
|
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
|
2016-07-20 19:27:32 +02:00
|
|
|
(or (getenv "GUIX_CONFIGURATION_DIRECTORY")
|
|
|
|
(string-append %sysconfdir "/guix")))
|
2013-12-29 15:52:50 +01:00
|
|
|
|
2012-12-05 23:02:47 +01:00
|
|
|
(define %system
|
|
|
|
"@guix_system@")
|
|
|
|
|
2016-07-18 23:14:14 +02:00
|
|
|
(define %libz
|
|
|
|
"@LIBZ@")
|
|
|
|
|
2019-03-08 19:02:59 +01:00
|
|
|
(define %liblz
|
|
|
|
"@LIBLZ@")
|
|
|
|
|
2013-04-12 17:30:27 +02:00
|
|
|
(define %gzip
|
|
|
|
"@GZIP@")
|
|
|
|
|
|
|
|
(define %bzip2
|
|
|
|
"@BZIP2@")
|
|
|
|
|
|
|
|
(define %xz
|
|
|
|
"@XZ@")
|
|
|
|
|
2012-11-03 21:07:52 +01:00
|
|
|
;;; config.scm ends here
|