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