2013-01-06 00:47:50 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2014-01-08 21:12:55 +01:00
|
|
|
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.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
|
2012-12-05 23:02:47 +01:00
|
|
|
%store-directory
|
|
|
|
%state-directory
|
2013-12-29 15:52:50 +01:00
|
|
|
%config-directory
|
2014-01-11 17:11:14 +01:00
|
|
|
%guix-register-program
|
2012-12-05 23:02:47 +01:00
|
|
|
%system
|
2012-11-03 21:07:52 +01:00
|
|
|
%libgcrypt
|
|
|
|
%nixpkgs
|
2013-04-12 17:30:27 +02:00
|
|
|
%nix-instantiate
|
|
|
|
%gzip
|
|
|
|
%bzip2
|
|
|
|
%xz))
|
2012-11-03 21:07:52 +01:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;;
|
|
|
|
;;; Compile-time configuration of Guix.
|
|
|
|
;;;
|
|
|
|
;;; 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@")
|
|
|
|
|
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)
|
|
|
|
"@storedir@"))
|
2012-12-05 23:02:47 +01:00
|
|
|
|
|
|
|
(define %state-directory
|
2012-12-13 23:53:37 +01:00
|
|
|
;; This must match `NIX_STATE_DIR' as defined in `daemon.am'.
|
2014-01-08 21:12:55 +01:00
|
|
|
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/nix"))
|
2012-12-05 23:02:47 +01:00
|
|
|
|
2013-12-29 15:52:50 +01:00
|
|
|
(define %config-directory
|
|
|
|
;; This must match `NIX_CONF_DIR' as defined in `daemon.am'.
|
|
|
|
(or (getenv "NIX_CONF_DIR") "@guix_sysconfdir@/guix"))
|
|
|
|
|
2014-01-11 17:11:14 +01:00
|
|
|
(define %guix-register-program
|
|
|
|
;; The 'guix-register' program.
|
|
|
|
(or (getenv "GUIX_REGISTER") "@guix_sbindir@/guix-register"))
|
|
|
|
|
2012-12-05 23:02:47 +01:00
|
|
|
(define %system
|
|
|
|
"@guix_system@")
|
|
|
|
|
2012-11-03 21:07:52 +01:00
|
|
|
(define %libgcrypt
|
|
|
|
"@LIBGCRYPT@")
|
|
|
|
|
|
|
|
(define %nixpkgs
|
|
|
|
(if (string=? "@NIXPKGS@" "")
|
|
|
|
#f
|
|
|
|
"@NIXPKGS@"))
|
|
|
|
|
|
|
|
(define %nix-instantiate
|
|
|
|
"@NIX_INSTANTIATE@")
|
|
|
|
|
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
|