guix-help-vars.el 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. ;;; guix-help-vars.el --- Variables related to Guix --help output
  2. ;; Copyright © 2015, 2017 Alex Kost <alezost@gmail.com>
  3. ;; This file is part of Emacs-Guix.
  4. ;; Emacs-Guix is free software; you can redistribute it and/or modify
  5. ;; it under the terms of the GNU General Public License as published by
  6. ;; the Free Software Foundation, either version 3 of the License, or
  7. ;; (at your option) any later version.
  8. ;;
  9. ;; Emacs-Guix is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;;
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with Emacs-Guix. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; This file provides regular expressions to parse various "guix
  18. ;; ... --help" outputs and lists of non-receivable items (system types,
  19. ;; hash formats, etc.).
  20. ;;; Code:
  21. ;;; Regexps for parsing "guix ..." outputs
  22. (defvar guix-help-parse-option-regexp
  23. (rx bol " "
  24. (zero-or-one (group "-" (not (any "- ")))
  25. ",")
  26. (one-or-more " ")
  27. (group "--" (one-or-more (or wordchar "-")))
  28. (group (zero-or-one "[")
  29. (zero-or-one "="))
  30. (zero-or-more (not space))
  31. (one-or-more space)
  32. (group (one-or-more any)))
  33. "Common regexp used to find command options.")
  34. (defvar guix-help-parse-command-regexp
  35. (rx bol " "
  36. (group wordchar (one-or-more (or wordchar "-"))))
  37. "Regexp used to find guix commands.
  38. 'Command' means any option not prefixed with '-'. For example,
  39. guix subcommand, system action, importer, etc.")
  40. (defvar guix-help-parse-long-option-regexp
  41. (rx (or " " ", ")
  42. (group "--" (one-or-more (or wordchar "-"))
  43. (zero-or-one "=")))
  44. "Regexp used to find long options.")
  45. (defvar guix-help-parse-short-option-regexp
  46. (rx bol (one-or-more blank)
  47. "-" (group (not (any "- "))))
  48. "Regexp used to find short options.")
  49. (defvar guix-help-parse-package-regexp
  50. (rx bol (group (one-or-more (not blank))))
  51. "Regexp used to find names of the packages.")
  52. (defvar guix-help-parse-list-regexp
  53. (rx bol (zero-or-more blank) "- "
  54. (group (one-or-more (or wordchar "-"))))
  55. "Regexp used to find various lists (lint checkers, graph types).")
  56. (defvar guix-help-parse-regexp-group 1
  57. "Parenthesized expression of regexps used to find commands and
  58. options.")
  59. ;;; Non-receivable lists of system types, hash formats, etc.
  60. (defvar guix-help-system-types
  61. '("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")
  62. "List of supported systems.")
  63. (defvar guix-help-source-types
  64. '("package" "all" "transitive")
  65. "List of supported sources types.")
  66. (defvar guix-help-hash-formats
  67. '("nix-base32" "base32" "base16" "hex" "hexadecimal")
  68. "List of supported hash formats.")
  69. (defvar guix-help-refresh-subsets
  70. '("core" "non-core")
  71. "List of supported 'refresh' subsets.")
  72. (defvar guix-help-key-policies
  73. '("interactive" "always" "never")
  74. "List of supported key download policies.")
  75. (defvar guix-help-verify-options
  76. '("repair" "contents")
  77. "List of supported 'verify' options")
  78. (defvar guix-help-elpa-archives
  79. '("gnu" "melpa" "melpa-stable")
  80. "List of supported ELPA archives.")
  81. (defvar guix-help-size-sort-keys
  82. '("closure" "self")
  83. "List of supported sort keys for 'guix size' command.")
  84. (defvar guix-help-search-paths-types
  85. '("exact" "prefix" "suffix")
  86. "List of supported search-paths types for 'guix package' command.")
  87. ;;; Default values of various options
  88. (defvar guix-default-hash-format
  89. "nix-base32"
  90. "Default format for 'guix hash' command.")
  91. (defvar guix-default-key-policy
  92. "interactive"
  93. "Default key download policy used by 'guix refresh' command.")
  94. (defvar guix-default-elpa-archive
  95. "gnu"
  96. "Default ELPA archive for 'guix import elpa' command.")
  97. (defvar guix-default-size-sort-key
  98. "closure"
  99. "Default sort key for 'guix size' command.")
  100. (defvar guix-default-search-paths-type
  101. "exact"
  102. "Default search-paths type for 'guix package' command.")
  103. (defvar guix-default-graph-backend
  104. "graphviz"
  105. "Default backend for 'guix graph' command.")
  106. (defvar guix-default-graph-node-type
  107. "package"
  108. "Default node type for 'guix graph' command.")
  109. (provide 'guix-help-vars)
  110. ;;; guix-help-vars.el ends here