guix-build-config.el.in 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ;;; guix-build-config.el --- Compile-time configuration variables
  2. ;; Copyright © 2015 Mathieu Lirzin <mthl@openmailbox.org>
  3. ;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com>
  4. ;; This file is part of Emacs-Guix.
  5. ;; Emacs-Guix is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation, either version 3 of the License, or
  8. ;; (at your option) any later version.
  9. ;;
  10. ;; Emacs-Guix is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;;
  15. ;; You should have received a copy of the GNU General Public License
  16. ;; along with Emacs-Guix. If not, see <http://www.gnu.org/licenses/>.
  17. ;;; Code:
  18. (defconst guix-config-name "@PACKAGE_NAME@"
  19. "Emacs-Guix full name.")
  20. (defconst guix-config-version "@PACKAGE_VERSION@"
  21. "Emacs-Guix version.")
  22. (defconst guix-config-image-directory
  23. (let ((dir (replace-regexp-in-string "${prefix}" "@prefix@"
  24. "@datarootdir@/emacs-guix/images")))
  25. (if (file-exists-p dir)
  26. dir
  27. (expand-file-name "images" "@abs_top_srcdir@")))
  28. "Directory with image files for Emacs-Guix.")
  29. (defconst guix-config-scheme-directory
  30. (let ((dir (replace-regexp-in-string "${prefix}" "@prefix@"
  31. "@guilemoduledir@")))
  32. ;; If dir does not exist, it means Emacs-Guix is not installed, so
  33. ;; it is used directly from source.
  34. (if (file-exists-p dir)
  35. dir
  36. (expand-file-name "scheme" "@abs_top_srcdir@")))
  37. "Directory with Scheme files for Emacs-Guix.")
  38. (defconst guix-config-scheme-compiled-directory
  39. (let ((dir (replace-regexp-in-string "${exec_prefix}" "@prefix@"
  40. "@guileccachedir@")))
  41. (if (file-exists-p dir)
  42. dir
  43. (expand-file-name "scheme" "@abs_top_builddir@")))
  44. "Directory with compiled Scheme (*.go) files for Emacs-Guix.")
  45. (defconst guix-config-guix-scheme-directory
  46. (let ((dir "@guixmoduledir@"))
  47. (and (not (string= "" dir))
  48. dir))
  49. "Directory with Guix modules.")
  50. (defconst guix-config-guix-scheme-compiled-directory
  51. (let ((dir "@guixccachedir@"))
  52. (and (not (string= "" dir))
  53. dir))
  54. "Directory with Guix compiled (*.go) files.")
  55. (defconst guix-config-guile-program "@GUILE@"
  56. "Name of the 'guile' executable defined at configure time.")
  57. (provide 'guix-build-config)
  58. ;;; guix-build-config.el ends here