* [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger.
@ 2020-07-05 18:20 Morgan.J.Smith
2020-07-06 12:24 ` Nicolas Goaziou
2020-07-11 1:34 ` Morgan.J.Smith
0 siblings, 2 replies; 4+ messages in thread
From: Morgan.J.Smith @ 2020-07-05 18:20 UTC (permalink / raw)
To: 42216; +Cc: Morgan Smith
From: Morgan Smith <Morgan.J.Smith@outlook.com>
* gnu/packages/emacs-xyz.scm (emacs-flycheck-ledger): New variable.
---
gnu/packages/emacs-xyz.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a67fe06610..486c93dce3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -179,6 +179,7 @@
#:use-module (gnu packages wordnet)
#:use-module (gnu packages photo)
#:use-module (gnu packages uml)
+ #:use-module (gnu packages finance)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -4074,6 +4075,28 @@ repetitions for example).")
compile}.")
(license license:gpl3+)))
+(define-public emacs-flycheck-ledger
+ (package
+ (name "emacs-flycheck-ledger")
+ (version "20200304.2204")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://melpa.org/packages/flycheck-ledger-"
+ version ".el"))
+ (sha256
+ (base32
+ "036xn52xjxbbvag9slqi4xqlvzg9p2q544hhxhqqi7jz1kap0yx8"))))
+ (inputs `(("ledger" ,ledger)))
+ (propagated-inputs
+ `(("emacs-flycheck" ,emacs-flycheck)))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/purcell/flycheck-ledger")
+ (synopsis "Ledger support for Flycheck")
+ (description "This flychecker uses the output of @code{ledger balance} on
+the current file to find errors such as unbalanced transactions and syntax
+errors.")
+ (license license:gpl3+)))
+
(define-public emacs-flycheck-rust
(package
(name "emacs-flycheck-rust")
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger.
2020-07-05 18:20 [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger Morgan.J.Smith
@ 2020-07-06 12:24 ` Nicolas Goaziou
2020-07-11 1:34 ` Morgan.J.Smith
1 sibling, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2020-07-06 12:24 UTC (permalink / raw)
To: Morgan.J.Smith; +Cc: 42216
Hello,
Morgan.J.Smith@outlook.com writes:
> * gnu/packages/emacs-xyz.scm (emacs-flycheck-ledger): New variable.
Thank you. Some comments follow.
> +(define-public emacs-flycheck-ledger
> + (package
> + (name "emacs-flycheck-ledger")
> + (version "20200304.2204")
There's a stable "0.5" release. We should use it instead.
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://melpa.org/packages/flycheck-ledger-"
> + version ".el"))
We don't use source files from MELPA, as they are somewhat modified
in-place. Use git-fetch instead.
Also, could you move `origin' behind `source'?
> + (sha256
> + (base32
> + "036xn52xjxbbvag9slqi4xqlvzg9p2q544hhxhqqi7jz1kap0yx8"))))
> + (inputs `(("ledger" ,ledger)))
I think this is not sufficient, because Emacs Flycheck Ledger will not
find the Ledger executable. You need to tweak
`flycheck-ledger-executable', using `emacs-substitute-variables'.
Could you send an updated patch?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger.
2020-07-05 18:20 [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger Morgan.J.Smith
2020-07-06 12:24 ` Nicolas Goaziou
@ 2020-07-11 1:34 ` Morgan.J.Smith
2020-07-14 9:13 ` bug#42216: " Nicolas Goaziou
1 sibling, 1 reply; 4+ messages in thread
From: Morgan.J.Smith @ 2020-07-11 1:34 UTC (permalink / raw)
To: 42216; +Cc: Morgan Smith
From: Morgan Smith <Morgan.J.Smith@outlook.com>
* gnu/packages/emacs-xyz.scm (emacs-flycheck-ledger): New variable.
---
Your idea of using `emacs-substitute-variables' was a good one, but
the variable in question is autogenerated somehow I think. I decided
to do a regex replace instead. I'm not super happy about this because
I think it could break easily but I saw emacs-flycheck-grammalecte
doing the same thing
gnu/packages/emacs-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 89fed81059..4de95a4f0a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -181,6 +181,7 @@
#:use-module (gnu packages wordnet)
#:use-module (gnu packages photo)
#:use-module (gnu packages uml)
+ #:use-module (gnu packages finance)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -4076,6 +4077,40 @@ repetitions for example).")
compile}.")
(license license:gpl3+)))
+(define-public emacs-flycheck-ledger
+ (package
+ (name "emacs-flycheck-ledger")
+ (version "0.5")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/purcell/flycheck-ledger.git")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1djrj3is0dzrl2703bw7bclf33dp4xqmy144q7xj5pvpb9v3kf50"))))
+ (inputs `(("ledger" ,ledger)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((ledger (assoc-ref inputs "ledger")))
+ ;; Specify the absolute executable location of ledger
+ (substitute* "flycheck-ledger.el"
+ (("\"ledger\"") (string-append "\"" ledger "\""))))
+ #t)))))
+ (propagated-inputs
+ `(("emacs-flycheck" ,emacs-flycheck)))
+ (build-system emacs-build-system)
+ (home-page "https://github.com/purcell/flycheck-ledger")
+ (synopsis "Ledger support for Flycheck")
+ (description "This flychecker uses the output of @code{ledger balance} on
+the current file to find errors such as unbalanced transactions and syntax
+errors.")
+ (license license:gpl3+)))
+
(define-public emacs-flycheck-rust
(package
(name "emacs-flycheck-rust")
--
2.27.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#42216: [PATCH] gnu: Add emacs-flycheck-ledger.
2020-07-11 1:34 ` Morgan.J.Smith
@ 2020-07-14 9:13 ` Nicolas Goaziou
0 siblings, 0 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2020-07-14 9:13 UTC (permalink / raw)
To: Morgan.J.Smith; +Cc: 42216-done
Hello,
Morgan.J.Smith@outlook.com writes:
> From: Morgan Smith <Morgan.J.Smith@outlook.com>
>
> * gnu/packages/emacs-xyz.scm (emacs-flycheck-ledger): New variable.
Applied. Thank you.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-07-14 9:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 18:20 [bug#42216] [PATCH] gnu: Add emacs-flycheck-ledger Morgan.J.Smith
2020-07-06 12:24 ` Nicolas Goaziou
2020-07-11 1:34 ` Morgan.J.Smith
2020-07-14 9:13 ` bug#42216: " Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.