config.scm.in 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019 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. %libz
  33. %liblz
  34. %gzip
  35. %bzip2
  36. %xz))
  37. ;;; Commentary:
  38. ;;;
  39. ;;; Compile-time configuration of Guix. When adding a substitution variable
  40. ;;; here, make sure to equip (guix scripts pull) to substitute it.
  41. ;;;
  42. ;;; Code:
  43. (define %guix-package-name
  44. "@PACKAGE_NAME@")
  45. (define %guix-version
  46. "@PACKAGE_VERSION@")
  47. (define %guix-bug-report-address
  48. "@PACKAGE_BUGREPORT@")
  49. (define %guix-home-page-url
  50. "@PACKAGE_URL@")
  51. (define %storedir
  52. "@storedir@")
  53. (define %localstatedir
  54. "@guix_localstatedir@")
  55. (define %sysconfdir
  56. "@guix_sysconfdir@")
  57. (define %store-directory
  58. (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
  59. %storedir))
  60. (define %state-directory
  61. ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
  62. (or (getenv "GUIX_STATE_DIRECTORY")
  63. (string-append %localstatedir "/guix")))
  64. (define %store-database-directory
  65. (or (getenv "GUIX_DATABASE_DIRECTORY")
  66. (string-append %state-directory "/db")))
  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 %system
  72. "@guix_system@")
  73. (define %libz
  74. "@LIBZ@")
  75. (define %liblz
  76. "@LIBLZ@")
  77. (define %gzip
  78. "@GZIP@")
  79. (define %bzip2
  80. "@BZIP2@")
  81. (define %xz
  82. "@XZ@")
  83. ;;; config.scm ends here