From ac17d6ebf8629109949a68df5857c54e872562c0 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 13 Sep 2022 23:23:22 +0200 Subject: gnu: emacs-libyaml: Improve package style. * gnu/packages/emacs-xyz.scm (emacs-libyaml)[arguments]: Use G-expressions. Remove trailing #T from phases. Prefer MAKE-FILE-WRITABLE over CHMOD. --- gnu/packages/emacs-xyz.scm | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) (limited to 'gnu/packages/emacs-xyz.scm') diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 159d19d673..6ac95d03e2 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -25822,31 +25822,30 @@ utilities.") (base32 "1c85583r47yjbpzbjgjzrwzqdlmy229xx9az2r18smcyd9da92c3")))) (build-system emacs-build-system) (arguments - `(#:tests? #f ;no test - #:modules ((guix build emacs-build-system) + (list + #:tests? #f ;no test + #:modules '((guix build emacs-build-system) (guix build emacs-utils) (guix build utils)) - #:imported-modules (,@%emacs-build-system-modules + #:imported-modules `(,@%emacs-build-system-modules (guix build gnu-build-system)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'substitute-libyaml-core-path - (lambda* (#:key outputs #:allow-other-keys) - (chmod "libyaml.el" #o644) - (substitute* "libyaml.el" - (("^\\(require 'libyaml-core\\)") - (string-append "(module-load \"" (assoc-ref outputs "out") - "/lib/libyaml-core.so\")"))) - #t)) - (add-after 'check 'make - ;; Run make. - (lambda* (#:key (make-flags '()) outputs #:allow-other-keys) - ;; Compile the shared object file. - (apply invoke "make" "all" "CPPFLAGS=" make-flags) - ;; Move the file into /lib. - (install-file "libyaml-core.so" - (string-append (assoc-ref outputs "out") "/lib")) - #t))))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'substitute-libyaml-core-path + (lambda _ + (make-file-writable "libyaml.el") + (substitute* "libyaml.el" + (("^\\(require 'libyaml-core\\)") + (string-append "(module-load \"" #$output + "/lib/libyaml-core.so\")"))))) + (add-after 'check 'make + ;; Run make. + (lambda* (#:key (make-flags '()) #:allow-other-keys) + ;; Compile the shared object file. + (apply invoke "make" "all" "CPPFLAGS=" make-flags) + ;; Move the file into /lib. + (install-file "libyaml-core.so" + (string-append #$output "/lib"))))))) (native-inputs (list libyaml)) (home-page "https://github.com/syohex/emacs-libyaml") (synopsis "Libyaml bindings for Emacs") -- cgit 1.4.1