You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

111 lines
2.7 KiB

  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2017 Caleb Ristvedt <caleb.ristvedt@cune.org>
  4. ;;;
  5. ;;; This file is part of GNU Guix.
  6. ;;;
  7. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  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. ;;;
  12. ;;; GNU Guix is distributed in the hope that it will be useful, but
  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
  18. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  19. (define-module (guix config)
  20. #:export (%guix-package-name
  21. %guix-version
  22. %guix-bug-report-address
  23. %guix-home-page-url
  24. %storedir
  25. %localstatedir
  26. %sysconfdir
  27. %store-directory
  28. %state-directory
  29. %store-database-directory
  30. %config-directory
  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 %store-directory
  59. (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
  60. %storedir))
  61. (define %state-directory
  62. ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
  63. (or (getenv "NIX_STATE_DIR")
  64. (string-append %localstatedir "/guix")))
  65. (define %store-database-directory
  66. (or (getenv "NIX_DB_DIR")
  67. (string-append %state-directory "/db")))
  68. (define %config-directory
  69. ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
  70. (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
  71. (string-append %sysconfdir "/guix")))
  72. (define %system
  73. "@guix_system@")
  74. (define %libgcrypt
  75. "@LIBGCRYPT@")
  76. (define %libz
  77. "@LIBZ@")
  78. (define %nix-instantiate
  79. "@NIX_INSTANTIATE@")
  80. (define %gzip
  81. "@GZIP@")
  82. (define %bzip2
  83. "@BZIP2@")
  84. (define %xz
  85. "@XZ@")
  86. ;;; config.scm ends here