config.scm.in 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (guix config)
  19. #:export (%guix-package-name
  20. %guix-version
  21. %guix-bug-report-address
  22. %guix-home-page-url
  23. %storedir
  24. %localstatedir
  25. %sysconfdir
  26. %sbindir
  27. %store-directory
  28. %state-directory
  29. %config-directory
  30. %guix-register-program
  31. %system
  32. %libgcrypt
  33. %libz
  34. %nix-instantiate
  35. %gzip
  36. %bzip2
  37. %xz))
  38. ;;; Commentary:
  39. ;;;
  40. ;;; Compile-time configuration of Guix. When adding a substitution variable
  41. ;;; here, make sure to equip (guix scripts pull) to substitute it.
  42. ;;;
  43. ;;; Code:
  44. (define %guix-package-name
  45. "@PACKAGE_NAME@")
  46. (define %guix-version
  47. "@PACKAGE_VERSION@")
  48. (define %guix-bug-report-address
  49. "@PACKAGE_BUGREPORT@")
  50. (define %guix-home-page-url
  51. "@PACKAGE_URL@")
  52. (define %storedir
  53. "@storedir@")
  54. (define %localstatedir
  55. "@guix_localstatedir@")
  56. (define %sysconfdir
  57. "@guix_sysconfdir@")
  58. (define %sbindir
  59. "@guix_sbindir@")
  60. (define %store-directory
  61. (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
  62. %storedir))
  63. (define %state-directory
  64. ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
  65. (or (getenv "NIX_STATE_DIR")
  66. (string-append %localstatedir "/guix")))
  67. (define %config-directory
  68. ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
  69. (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
  70. (string-append %sysconfdir "/guix")))
  71. (define %guix-register-program
  72. ;; The 'guix-register' program.
  73. (or (getenv "GUIX_REGISTER")
  74. (string-append %sbindir "/guix-register")))
  75. (define %system
  76. "@guix_system@")
  77. (define %libgcrypt
  78. "@LIBGCRYPT@")
  79. (define %libz
  80. "@LIBZ@")
  81. (define %nix-instantiate
  82. "@NIX_INSTANTIATE@")
  83. (define %gzip
  84. "@GZIP@")
  85. (define %bzip2
  86. "@BZIP2@")
  87. (define %xz
  88. "@XZ@")
  89. ;;; config.scm ends here