Subject: [PATCH] emacs-org-roam: Add new phase after unpack.
From: Alexandr Vityazev <[email-masked]>
To: [email-masked]
Date: Mon, 30 Aug 2021 21:42:43 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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(+)

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")))
-- 
2.33.0

-- 

Alexandr Vityazev