summary refs log tree commit diff
diff options
context:
space:
mode:
authorMorgan Smith <Morgan.J.Smith@outlook.com>2021-11-02 19:13:10 -0400
committerEfraim Flashner <efraim@flashner.co.il>2021-11-04 14:48:43 +0200
commit88d5081986bb1f78b37a11e9e24f5658f2315558 (patch)
treeca1010b2629b087f832def095d21520164640a1d
parent1007eb4874b7d3d2e0ecda07157f5794a0591ea2 (diff)
downloadguix-88d5081986bb1f78b37a11e9e24f5658f2315558.tar.gz
gnu: emacs-flymake-shellcheck: Add reference to shellcheck.
* gnu/packages/emacs-xyz.scm (emacs-flymake-shellcheck)
[inputs]: Add shellcheck.
[arguments]: Add substitute-shellcheck-path phase.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/packages/emacs-xyz.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 7ff478468d..9ba178513c 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -1649,6 +1649,19 @@ boilerplate code from defining new Flymake backend functions.")
          (sha256
           (base32 "04yfb4sy41spjzk9mhm4gy0h8vnjx09p2g6nm1yzgd9a5ph9sqgl"))))
       (build-system emacs-build-system)
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'substitute-shellcheck-path
+             (lambda* (#:key inputs #:allow-other-keys)
+               (make-file-writable "flymake-shellcheck.el")
+               (emacs-substitute-sexps "flymake-shellcheck.el"
+                 ("defcustom flymake-shellcheck-path"
+                  `(or (executable-find "shellcheck")
+                       ,(string-append (assoc-ref inputs "shellcheck")
+                                       "/bin/shellcheck")))))))))
+      (inputs
+       `(("shellcheck" ,shellcheck)))
       (home-page "https://github.com/federicotdn/flymake-shellcheck")
       (synopsis "Flymake backend for Bash/Sh powered by ShellCheck")
       (description