diff mbox series

[bug#50287] emacs-org-roam: Add new phase after unpack.

Message ID 87bl5e4njg.fsf@posteo.org
State Accepted
Headers show
Series [bug#50287] emacs-org-roam: Add new phase after unpack. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Aleksandr Vityazev Aug. 30, 2021, 9:42 p.m. UTC
* gnu/packages/emacs-xyz.scm (emacs-org-roam)[arguments]<phases>:
After the unpack phase add a move-source-files phase to include
the org-roam extensions to the package.
---
 gnu/packages/emacs-xyz.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Ludovic Courtès Sept. 7, 2021, 1:58 p.m. UTC | #1
Hi,

Alexandr Vityazev <avityazev@posteo.org> skribis:

> * gnu/packages/emacs-xyz.scm (emacs-org-roam)[arguments]<phases>:
> After the unpack phase add a move-source-files phase to include
> the org-roam extensions to the package.

Applied, thanks.

However, the newly installed files aren’t getting compiled.  Should we
do something about it?

Ludo’.
Aleksandr Vityazev Sept. 8, 2021, 6:32 p.m. UTC | #2
uld we
 > do something about it?
 I installed this package on 2 different machines and in both cases all
 files were compiled. Perhaps I am missing something, and my knowledge is
 clearly not enough to understand when this can happen, so I have no
 solution.
 --=20
 Alexandr Vityazev
diff mbox series

Patch

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 70c4c30bc2..679636c123 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -28227,6 +28227,15 @@  snippets for Emacs.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         ;; Move the extensions source files to the top level, which is included in
+         ;; the EMACSLOADPATH.
+         (add-after 'unpack 'move-source-files
+           (lambda _
+             (let ((el-files (find-files "./extensions" ".*\\.el$")))
+               (for-each (lambda (f)
+                           (rename-file f (basename f)))
+                         el-files))
+             #t))
          (add-after 'install 'install-image
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))