expose doom-emacs binaries in the main derivation

This commit is contained in:
ckie
2021-12-10 16:28:18 +02:00
parent d259993f6d
commit d639071134

View File

@@ -173,13 +173,19 @@ let
doom-emacs = stdenv.mkDerivation rec {
name = "doom-emacs";
src = doomSrc;
patches = [
(substituteAll {
src = ./nix-integration.patch;
local = doomLocal;
})
];
buildPhase = ":";
buildPhase = ''
patchShebangs bin
# Remove the windows wrapper for the CLI so the build doesn't fail
rm bin/doom.cmd
'';
installPhase = ''
mkdir -p $out
cp -r * $out
@@ -236,6 +242,11 @@ emacs.overrideAttrs (esuper:
wrapEmacs $prog
done
# Doom comes with some CLIs (org-tangle, org-capture, doom)
for prog in ${doom-emacs}/bin/*; do
makeWrapper $prog $out/bin/"$(basename $prog)" --prefix PATH : $out/bin
done
if [[ -e $out/Applications ]]; then
wrapEmacs "$out/Applications/Emacs.app/Contents/MacOS/Emacs"
fi