guix-commits
[Top][All Lists]
Advanced

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

03/04: gnu: emacs-tuareg: Improve package style.


From: guix-commits
Subject: 03/04: gnu: emacs-tuareg: Improve package style.
Date: Tue, 27 Sep 2022 13:32:10 -0400 (EDT)

ngz pushed a commit to branch master
in repository guix.

commit 8b4e7892f5a824750d7411c05063b6eb6148c9e3
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
AuthorDate: Tue Sep 27 19:26:24 2022 +0200

    gnu: emacs-tuareg: Improve package style.
    
    * gnu/packages/ocaml.scm (emacs-tuareg)[arguments]<#:imported-modules,
    <#:phases>: Use G-expressions.  Remove trailing #T at the end of phases.  
Use
    ELPA-DIRECTORY function.
    [native-inputs]: Remove input labels.
---
 gnu/packages/ocaml.scm | 50 ++++++++++++++++++++++++++------------------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 320b2f3f1c..b8f8a6f70b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1092,31 +1092,33 @@ the OCaml core distribution.")
        (sha256
         (base32 "115vm0hq4xkwfd3w0j8xqhkdgcirlxpnwzwxv02c27583hj056is"))))
     (build-system gnu-build-system)
-    (native-inputs
-     `(("emacs" ,emacs-minimal)
-       ("opam" ,opam)))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'make-git-checkout-writable
-           (lambda _
-             (for-each make-file-writable (find-files "."))
-             #t))
-         (delete 'configure)
-         (add-before 'install 'fix-install-path
-           (lambda* (#:key outputs #:allow-other-keys)
-             (substitute* "Makefile"
-               (("/emacs/site-lisp")
-                (string-append (assoc-ref %outputs "out")
-                               "/share/emacs/site-lisp/")))
-             #t))
-         (add-after 'install 'post-install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (symlink "tuareg.el"
-                      (string-append (assoc-ref outputs "out")
-                                     "/share/emacs/site-lisp/"
-                                     "tuareg-autoloads.el"))
-             #t)))))
+     (list
+      #:imported-modules `(,@%gnu-build-system-modules
+                           (guix build emacs-build-system)
+                           (guix build emacs-utils))
+      #:modules '((guix build gnu-build-system)
+                  ((guix build emacs-build-system) #:prefix emacs:)
+                  (guix build emacs-utils)
+                  (guix build utils))
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'make-git-checkout-writable
+            (lambda _
+              (for-each make-file-writable (find-files "."))))
+          (delete 'configure)
+          (add-before 'install 'fix-install-path
+            (lambda _
+              (substitute* "Makefile"
+                (("/emacs/site-lisp")
+                 (emacs:elpa-directory #$output)))))
+          (add-after 'install 'post-install
+            (lambda _
+              (symlink "tuareg.el"
+                       (string-append (emacs:elpa-directory #$output)
+                                      "/tuareg-autoloads.el")))))))
+    (native-inputs
+     (list emacs-minimal opam))
     (home-page "https://github.com/ocaml/tuareg";)
     (synopsis "OCaml programming mode, REPL, debugger for Emacs")
     (description "Tuareg helps editing OCaml code, to highlight important



reply via email to

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