me
/
guix
Archived
1
0
Fork 0

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.
master
Nicolas Goaziou 2022-09-13 23:23:22 +02:00
parent 2f0b3b2d22
commit ac17d6ebf8
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 21 additions and 22 deletions

View File

@ -25822,31 +25822,30 @@ utilities.")
(base32 "1c85583r47yjbpzbjgjzrwzqdlmy229xx9az2r18smcyd9da92c3")))) (base32 "1c85583r47yjbpzbjgjzrwzqdlmy229xx9az2r18smcyd9da92c3"))))
(build-system emacs-build-system) (build-system emacs-build-system)
(arguments (arguments
`(#:tests? #f ;no test (list
#:modules ((guix build emacs-build-system) #:tests? #f ;no test
#:modules '((guix build emacs-build-system)
(guix build emacs-utils) (guix build emacs-utils)
(guix build utils)) (guix build utils))
#:imported-modules (,@%emacs-build-system-modules #:imported-modules `(,@%emacs-build-system-modules
(guix build gnu-build-system)) (guix build gnu-build-system))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'substitute-libyaml-core-path (add-after 'unpack 'substitute-libyaml-core-path
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(chmod "libyaml.el" #o644) (make-file-writable "libyaml.el")
(substitute* "libyaml.el" (substitute* "libyaml.el"
(("^\\(require 'libyaml-core\\)") (("^\\(require 'libyaml-core\\)")
(string-append "(module-load \"" (assoc-ref outputs "out") (string-append "(module-load \"" #$output
"/lib/libyaml-core.so\")"))) "/lib/libyaml-core.so\")")))))
#t))
(add-after 'check 'make (add-after 'check 'make
;; Run make. ;; Run make.
(lambda* (#:key (make-flags '()) outputs #:allow-other-keys) (lambda* (#:key (make-flags '()) #:allow-other-keys)
;; Compile the shared object file. ;; Compile the shared object file.
(apply invoke "make" "all" "CPPFLAGS=" make-flags) (apply invoke "make" "all" "CPPFLAGS=" make-flags)
;; Move the file into /lib. ;; Move the file into /lib.
(install-file "libyaml-core.so" (install-file "libyaml-core.so"
(string-append (assoc-ref outputs "out") "/lib")) (string-append #$output "/lib")))))))
#t)))))
(native-inputs (list libyaml)) (native-inputs (list libyaml))
(home-page "https://github.com/syohex/emacs-libyaml") (home-page "https://github.com/syohex/emacs-libyaml")
(synopsis "Libyaml bindings for Emacs") (synopsis "Libyaml bindings for Emacs")