* [bug#40429] [PATCH] gnu: Add emacs-flymake-shellcheck.
@ 2020-04-04 15:35 LaFreniere, Joseph
2020-04-05 8:11 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: LaFreniere, Joseph @ 2020-04-04 15:35 UTC (permalink / raw)
To: 40429
[-- Attachment #1: Type: text/plain, Size: 46 bytes --]
Patch file is attached.
--
Joseph LaFreniere
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-emacs-flymake-shellcheck.patch --]
[-- Type: text/x-patch, Size: 2588 bytes --]
From 53688eb572a104972eadd2d0d8568452e41b2f70 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [bug#40429] [PATCH] gnu: Add emacs-flymake-shellcheck.
2020-04-04 15:35 [bug#40429] [PATCH] gnu: Add emacs-flymake-shellcheck LaFreniere, Joseph
@ 2020-04-05 8:11 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2020-04-05 8:11 UTC (permalink / raw)
To: LaFreniere, Joseph; +Cc: 40429
Hello,
"LaFreniere, Joseph" <joseph@lafreniere.xyz> writes:
> Patch file is attached.
Thank you.
> + (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")))))))))
You could use `emacs-substitute-variables' here.
However, I wonder if we should add "shellcheck" as an input. Of course,
the package will not work so well if "shellcheck" is not available. But,
as a user, it would not cross my mind to use "flymake-shellcheck"
without it. As another data point, "emacs-flycheck-rust" doesn't add
"rust" as an input.
WDYT?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-05 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-04 15:35 [bug#40429] [PATCH] gnu: Add emacs-flymake-shellcheck LaFreniere, Joseph
2020-04-05 8:11 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).