guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: emacs-lice-el: Improve package style.


From: guix-commits
Subject: 02/02: gnu: emacs-lice-el: Improve package style.
Date: Mon, 31 Oct 2022 20:05:32 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit 41a5720be9f0dd105e53ac73253445b966288ac7
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue Nov 1 00:25:20 2022 +0100

    gnu: emacs-lice-el: Improve package style.
    
    * gnu/packages/emacs-xyz.scm (emacs-lice-el)[arguments]: Use G-expressions.
    <#:include>: Add "template" directory instead of installing files manually.
    <#:phases>: Use ELPA-DIRECTORY.  Remove trailing #T.
---
 gnu/packages/emacs-xyz.scm | 26 +++++++++-----------------
 1 file changed, 9 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 85aa8ac136..f3e11a3733 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -21911,23 +21911,15 @@ Magit.")
                 "06plnrxj6kgnl9mjcbc48mgagpa60yyyyribwicmcgg9pgrs0wad"))))
     (build-system emacs-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'patch-template-directory
-           (lambda* (#:key outputs #:allow-other-keys)
-             (chmod "lice.el" #o666)
-             (emacs-substitute-variables "lice.el"
-               ("lice:system-template-directory"
-                (string-append (assoc-ref outputs "out")
-                               "/share/emacs-lice-el/template")))
-             #t))
-         (add-after 'install 'install-templates
-           (lambda* (#:key outputs #:allow-other-keys)
-             (copy-recursively
-              "template"
-              (string-append (assoc-ref outputs "out")
-                             "/share/emacs-lice-el/template"))
-             #t)))))
+     (list
+      #:include #~(cons "^template/" %default-include)
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'patch-template-directory
+            (lambda _
+              (emacs-substitute-variables "lice.el"
+                ("lice:system-template-directory"
+                 (string-append (elpa-directory #$output) "/template"))))))))
     (home-page "https://github.com/buzztaiki/lice-el";)
     (synopsis "License and header template for Emacs")
     (description "@code{lice.el} provides following features:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]