Subject: [PATCH] gnu: Add emacs-flymake-shellcheck.

From: "LaFreniere, Joseph" <[email-masked]>
Date: Sat, 04 Apr 2020 10:35:13 -0500

Patch file is attached.

--
Joseph LaFreniere
>From 53688eb572a104972eadd2d0d8568452e41b2f70 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <[email-masked]>
Date: Sat, 4 Apr 2020 09:50:56 -0500
Subject: [PATCH] gnu: Add emacs-flymake-shellcheck.

* gnu/packages/emacs-xyz.scm (emacs-flymake-shellcheck): New variable.
---
 gnu/packages/emacs-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index cd2562103c..eb62bc578b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -163,6 +163,7 @@
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages video)
+  #:use-module (gnu packages haskell-apps)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages wordnet)
   #:use-module (gnu packages photo)
@@ -3548,6 +3549,43 @@ It also provides an easy way to find synonyms and antonyms for a given
 word (to avoid repetitions for example).")
     (license license:gpl3+)))
 
+(define-public emacs-flymake-shellcheck
+  (let ((version "0.1")
+        (revision "0")
+        (commit "bb413006afc23105a0f84df6fb82504a06483a55"))
+    (package
+      (name "emacs-flymake-shellcheck")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/federicotdn/flymake-shellcheck.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "09cqn0255pxim34v5zfypbzr4clfd2ajlsyxpc9h64wg6v9876y5"))))
+      (build-system emacs-build-system)
+      (inputs
+       `(("shellcheck" ,shellcheck)))
+      (arguments
+       '(#:phases
+         (modify-phases %standard-phases
+           (add-after 'unpack 'hardcode-shellcheck-path
+             (lambda _
+               (let ((file "flymake-shellcheck.el"))
+                 (chmod file #o644)
+                 (emacs-substitute-sexps file
+                   ("(defcustom flymake-shellcheck-path"
+                    (which "shellcheck")))))))))
+      (home-page "https://github.com/federicotdn/flymake-shellcheck")
+      (synopsis "A bash/sh Flymake backend powered by ShellCheck")
+      (description
+       "This package adds a @code{shellcheck} backend to Flymake.  The
+recommended usage is to add @code{flymake-shellcheck-load} to
+@code{sh-mode-hook}.")
+      (license license:gpl3+))))
+
 (define-public emacs-flycheck-rust
   (package
     (name "emacs-flycheck-rust")
-- 
2.26.0