Fix revealjs build for org +present

Noticed through upcoming test coverage improvements.
This commit is contained in:
Marien Zwart 2024-05-26 17:19:44 +10:00
parent f7a4b53913
commit 78ad78072d
No known key found for this signature in database
3 changed files with 21 additions and 0 deletions

View file

@ -75,6 +75,8 @@ in {
interactive = doomTest "minimal" { config = [ "default" ]; } { };
interactive-without-loader = doomTest "minimal" { config = [ "default" ]; } { profileName = ""; };
org-re-reveal = doomTest "org-re-reveal" { lang = [ [ "org" "+present" ] ]; } { };
# Various tests of module combinations.
unpinned-org = doomTest "external-org" { app = [ [ "rss" "+org" ] ]; } { };
}

View file

@ -18,6 +18,7 @@
esuper,
git,
makeWrapper,
stdenvNoCC,
writeText,
}:
{
@ -185,6 +186,17 @@
./elisp-patches/helm-taskrunner-version.patch
];
};
# reveal.js is not actually an ELisp package. Doom gets straight.el to install it,
# then makes org-re-reveal use it as data.
revealjs = stdenvNoCC.mkDerivation {
pname = "revealjs";
version = "9999snapshot";
buildPhase = ''
siteDir=$out/share/emacs/site-lisp/revealjs
mkdir -p $siteDir
cp -r css dist js plugin $siteDir/
'';
};
# Make it byte-compile properly.
code-review = esuper.code-review.overrideAttrs (attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ git ];

View file

@ -30,6 +30,13 @@
(unless (string-search "/site-lisp/" path)
(error "org-mode probably built-in: %s" path))))
(defun test-org-re-reveal ()
"Test org-re-reveal can find reveal.js."
(require 'ox)
(require 'org-re-reveal)
(unless (string-search "/site-lisp/revealjs" org-re-reveal-root)
(error "org-re-reveal does not find our revealjs: %s" org-re-reveal-root)))
(defun test-doom ()
(let* ((out (getenv "out"))
(test (intern-soft (format "test-%s" (getenv "testName"))))