[bug#78289] gnu: emacs-lean4-mode: add data dir to output
Commit Message
hi Nicolas,
thank you for the info about guix style! attaching a diff to this reply after applying the updates. my email client has a habit of chewing up patches and send-email is currently throwing errors for me
emma (bigbookofbug)
EF515F7D600717781DF9AB2E0FB1CF2867A117F5
Sent with Proton Mail secure email.
On Thursday, May 8th, 2025 at 2:13 PM, Nicolas Graves <ngraves@ngraves.fr> wrote:
> Hi Emma,
> TY for your contribution!
>
> You can use elpa-directory to make this code easier to read, see for
> instance :
> https://issues.guix.gnu.org/issue/78315/attachment/51/
>
> Also :
> - arguments field usually comes after build-system
> - the code is not formatted properly. If you don't use a fancy editor
> with support for guile, you can always run
> ./pre-inst-env guix style emacs-lean4-mode to do it for you.
>
> Can you submit a new version with that taken into account? Thanks!
>
> On 2025-05-07 02:25, emma via Guix-patches via wrote:
>
> > ---
> >
> > gnu/packages/emacs-xyz.scm | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> > index 50a6f4c386..fd919aa210 100644
> > --- a/gnu/packages/emacs-xyz.scm
> > +++ b/gnu/packages/emacs-xyz.scm
> > @@ -3081,6 +3081,17 @@ (define-public emacs-lean4-mode
> > ;; TODO: Just emacs-magit-section instead of emacs-magit would be enough.
> > (propagated-inputs
> > (list emacs-compat emacs-lsp-mode emacs-dash emacs-magit))
> > + (arguments
> > + (list
> > + #:phases
> > + #~(modify-phases %standard-phases
> > + (add-after 'install 'install-data
> > + (lambda _
> > + (let ((data (string-append #$output
> > + "/share/emacs/site-lisp/"
> > + "lean4-mode-1.1.2/data")))
> > + (mkdir-p data)
> > + (copy-recursively "data" data)))))))
> > (synopsis "Lean 4 major mode for Emacs")
> > (description "This package provides a major mode for the Lean theorem
> > prover, version 4.")
> >
> > base-commit: d110f7dd006f4e47aa56de3cdaf5bb4b82eb5ca2
> > --
> > 2.49.0
> >
> > emma (bigbookofbug)
> > EF515F7D600717781DF9AB2E0FB1CF2867A117F5
> >
> > Sent with Proton Mail secure email.
>
>
> --
> Best regards,
> Nicolas Graves
From d9b4625639943255cd1c56443bd3068921ece0a1 Mon Sep 17 00:00:00 2001
From: emma thompson <bigbookofbug@proton.me>
Date: Fri, 9 May 2025 09:18:01 -0500
Subject: [PATCH] styling updated
---
gnu/packages/emacs-xyz.scm | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
@@ -3079,19 +3079,17 @@ (define-public emacs-lean4-mode
"1i4l614n0hs02y0a4xfnzc4xkilkp6bzx28pys4jkp96vp2ivf0c"))))
(build-system emacs-build-system)
;; TODO: Just emacs-magit-section instead of emacs-magit would be enough.
- (propagated-inputs
- (list emacs-compat emacs-lsp-mode emacs-dash emacs-magit))
(arguments
(list
#:phases
#~(modify-phases %standard-phases
- (add-after 'install 'install-data
- (lambda _
- (let ((data (string-append #$output
- "/share/emacs/site-lisp/"
- "lean4-mode-1.1.2/data")))
- (mkdir-p data)
- (copy-recursively "data" data)))))))
+ (add-after 'install 'install-data
+ (lambda _
+ (let ((data (string-append (elpa-directory #$output) "/data")))
+ (mkdir-p data)
+ (copy-recursively "data" data)))))))
+ (propagated-inputs
+ (list emacs-compat emacs-lsp-mode emacs-dash emacs-magit))
(synopsis "Lean 4 major mode for Emacs")
(description "This package provides a major mode for the Lean theorem
prover, version 4.")
--
2.49.0