gnu: Add yapet.
[guix.git] / emacs / guix-help-vars.el
blob8117d28f3e3bdeeec6ddefbab5465f9f5da91894
1 ;;; guix-help-vars.el --- Variables related to --help output
3 ;; Copyright © 2015 Alex Kost <alezost@gmail.com>
5 ;; This file is part of GNU Guix.
7 ;; GNU Guix is free software; you can redistribute it and/or modify
8 ;; it under the terms of the GNU General Public License as published by
9 ;; the Free Software Foundation, either version 3 of the License, or
10 ;; (at your option) any later version.
12 ;; GNU Guix is distributed in the hope that it will be useful,
13 ;; but 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.
17 ;; You should have received a copy of the GNU General Public License
18 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ;;; Commentary:
22 ;; This file provides regular expressions to parse various "guix
23 ;; ... --help" outputs and lists of non-receivable items (system types,
24 ;; hash formats, etc.).
26 ;;; Code:
29 ;;; Regexps for parsing "guix ..." outputs
31 (defvar guix-help-parse-option-regexp
32 (rx bol " "
33 (zero-or-one (group "-" (not (any "- ")))
34 ",")
35 (one-or-more " ")
36 (group "--" (one-or-more (or wordchar "-")))
37 (group (zero-or-one "[")
38 (zero-or-one "="))
39 (zero-or-more (not space))
40 (one-or-more space)
41 (group (one-or-more any)))
42 "Common regexp used to find command options.")
44 (defvar guix-help-parse-command-regexp
45 (rx bol " "
46 (group wordchar (one-or-more (or wordchar "-"))))
47 "Regexp used to find guix commands.
48 'Command' means any option not prefixed with '-'. For example,
49 guix subcommand, system action, importer, etc.")
51 (defvar guix-help-parse-long-option-regexp
52 (rx (or " " ", ")
53 (group "--" (one-or-more (or wordchar "-"))
54 (zero-or-one "=")))
55 "Regexp used to find long options.")
57 (defvar guix-help-parse-short-option-regexp
58 (rx bol (one-or-more blank)
59 "-" (group (not (any "- "))))
60 "Regexp used to find short options.")
62 (defvar guix-help-parse-package-regexp
63 (rx bol (group (one-or-more (not blank))))
64 "Regexp used to find names of the packages.")
66 (defvar guix-help-parse-list-regexp
67 (rx bol (zero-or-more blank) "- "
68 (group (one-or-more (or wordchar "-"))))
69 "Regexp used to find various lists (lint checkers, graph types).")
71 (defvar guix-help-parse-regexp-group 1
72 "Parenthesized expression of regexps used to find commands and
73 options.")
76 ;;; Non-receivable lists of system types, hash formats, etc.
78 (defvar guix-help-system-types
79 '("x86_64-linux" "i686-linux" "armhf-linux" "mips64el-linux")
80 "List of supported systems.")
82 (defvar guix-help-source-types
83 '("package" "all" "transitive")
84 "List of supported sources types.")
86 (defvar guix-help-hash-formats
87 '("nix-base32" "base32" "base16" "hex" "hexadecimal")
88 "List of supported hash formats.")
90 (defvar guix-help-refresh-subsets
91 '("core" "non-core")
92 "List of supported 'refresh' subsets.")
94 (defvar guix-help-key-policies
95 '("interactive" "always" "never")
96 "List of supported key download policies.")
98 (defvar guix-help-verify-options
99 '("repair" "contents")
100 "List of supported 'verify' options")
102 (defvar guix-help-elpa-archives
103 '("gnu" "melpa" "melpa-stable")
104 "List of supported ELPA archives.")
106 (provide 'guix-help-vars)
108 ;;; guix-help-vars.el ends here