1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- (defvar guix-store-directory "/gnu/store"
- "Name of the Guix store directory.
- See Info node `(guix) The Store'.
- This string is used in various regular expressions and it
- shouldn't end with a trailing slash.")
- (defvar guix-hash-regexp
-
-
- (rx (= 32 (any "0-9" "a-d" "f-n" "p-s" "v-z")))
- "Regexp matching hash part of a store file name.")
- (unless (rassq 'guix-build-log-mode auto-mode-alist)
-
-
-
- (let ((chars-rx (rx (+ (any alnum "-_+.")))))
- (setq
- auto-mode-alist
- (append
-
- `((,(rx-to-string `(and "/guix/drvs/" (= 2 alnum) "/" (= 30 alnum)
- "-" (regexp ,chars-rx) ".drv" string-end)
- t)
- . guix-build-log-mode)
- (,(rx-to-string `(and ,guix-store-directory "/"
- (regexp ,chars-rx) ".drv" string-end)
- t)
- . guix-derivation-mode)
- (,(rx-to-string `(and "/etc/profile" string-end) t)
- . guix-env-var-mode)
- (,(rx-to-string
- `(and "/tmp/guix-build-" (regexp ,chars-rx)
- ".drv-" (one-or-more digit) "/environment-variables"
- string-end)
- t)
- . guix-env-var-mode)
- (,(rx-to-string
- `(and "/guix/profiles/system" (* (regexp ,chars-rx)) "/"
- (or "boot" "parameters")
- string-end)
- t)
- . guix-scheme-mode)
- (,(rx-to-string
- `(and ,guix-store-directory "/" (regexp ,guix-hash-regexp) "-"
- (or "activate" "activate-service" "boot" "parameters"
- "shepherd.conf"
- (and "shepherd" (regexp ,chars-rx) ".scm")
- (and (regexp ,chars-rx) "-guile-builder"))
- string-end)
- t)
- . guix-scheme-mode))
- auto-mode-alist))))
- (provide 'guix-auto-mode)
|