unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: Morgan.J.Smith@outlook.com
Cc: 51364@debbugs.gnu.org
Subject: [bug#51364] [PATCH] gnu: emacs-flymake-shellcheck: Add shellcheck as an input
Date: Mon, 25 Oct 2021 14:39:40 +0300	[thread overview]
Message-ID: <YXaXfOIke9aDzc/o@3900XT> (raw)
In-Reply-To: <BYAPR05MB4023A6FD0C1527D04116C7F3C5819@BYAPR05MB4023.namprd05.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]

On Sat, Oct 23, 2021 at 06:21:28PM -0400, Morgan.J.Smith@outlook.com wrote:
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
> 
> * gnu/packages/emacs-xyz.scm (emacs-flymake-shellcheck)
> [inputs]: Add shellcheck.
> [arguments]: Add substitute-shellcheck-path phase.
> ---
>  gnu/packages/emacs-xyz.scm | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index aeb6aa4aba..602e6067a4 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -1649,6 +1649,18 @@ (define-public emacs-flymake-shellcheck
>           (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)
> +               (chmod "flymake-shellcheck.el" #o644)

This line I'd change to
(make-file-writable "flymake-shellcheck.el")

> +               (emacs-substitute-variables "flymake-shellcheck.el"
> +                 ("flymake-shellcheck-path"
> +                  (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
> -- 
> 2.33.1
> 

I'm not sure about hardcoding the path to shellcheck and removing the
option to override it in the normal way of the file, by setting
flymake-shellcheck-path¹. I am not sure of the exact return value of
(executable-find "shellcheck") but it seems safer to replace that.

Can you send an updated patch?

¹ I assume, I don't actually use emacs

-- 
Efraim Flashner   <efraim@flashner.co.il>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-10-25 11:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-23 22:21 [bug#51364] [PATCH] gnu: emacs-flymake-shellcheck: Add shellcheck as an input Morgan.J.Smith
2021-10-25 11:39 ` Efraim Flashner [this message]
2021-11-02 23:23 ` Morgan.J.Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YXaXfOIke9aDzc/o@3900XT \
    --to=efraim@flashner.co.il \
    --cc=51364@debbugs.gnu.org \
    --cc=Morgan.J.Smith@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).