On Sat, 8 Jun 2019, Jack Hill wrote:

I'll ask the recutils upstream if this was intentional.

I have done so at: <https://lists.gnu.org/archive/html/help-recutils/2019-06/msg00000.html>

In the meantime, what do we want to do in Guix? I see two options: one is patching the build system, and the other is adding a phase to install the elisp files. The latter seems to me like the clearest and easiest approach here.

The attached patch does the latter, copying the two elisp files to the site-elisp directory. It does not byte-compile the files or generate autoloads (we do we need to generate autoloads?). However, I don't think recutils 1.7 did either of those either, so at least we're no worse off then we were then.

What do you think?

Best,
Jack
From 76f35e000fd58918c28a0b21c4a3911d494a2a08 Mon Sep 17 00:00:00 2001
From: Jack Hill <[email protected]>
Date: Sat, 8 Jun 2019 16:53:02 -0400
Subject: [PATCH] gnu: recutils: Install elisp files

Fixes <https://bugs.gnu.org/35919>

* gnu/packages/databases.scm: (recutils) Add install-elisp phase
---
 gnu/packages/databases.scm | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index ad4698f24c..9c06a4eb51 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -943,10 +943,22 @@ organized in a hash table or B+ tree.")
     (arguments '(#:configure-flags
                  (list (string-append "--with-bash-headers="
                                       (assoc-ref %build-inputs "bash:include")
-                                      "/include/bash"))))
-
-    (native-inputs `(("emacs" ,emacs-minimal)
-                     ("bc" ,bc)
+                                      "/include/bash"))
+                 #:phases
+                 (modify-phases %standard-phases
+                   (add-after 'install 'install-elisp
+                     (lambda* (#:key outputs #:allow-other-keys)
+                       (let* ((out           (assoc-ref outputs "out"))
+                              (emacs-sitedir (string-append
+                                              out "/share/emacs/site-lisp"))
+                              (elisp-files   (list "etc/rec-mode.el" "etc/ob-rec.el")))
+                         ;; TODO: compile files
+                         (for-each (lambda (file)
+                                     (install-file file emacs-sitedir))
+                                   elisp-files)
+                         #t))))))
+
+    (native-inputs `(("bc" ,bc)
                      ("bash:include" ,bash "include")
                      ("check" ,check)
                      ("libuuid" ,util-linux)
-- 
2.21.0

Reply via email to