From d639071134a1315769eb9cb47fa38177c9380e14 Mon Sep 17 00:00:00 2001 From: ckie Date: Fri, 10 Dec 2021 16:28:18 +0200 Subject: [PATCH] expose doom-emacs binaries in the main derivation --- default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index f707c6e..e262fe0 100644 --- a/default.nix +++ b/default.nix @@ -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