nix-doom-emacs: add a summary at the end of build

It makes debugging so much easier
This commit is contained in:
László Vaskó
2020-08-21 12:23:31 +02:00
parent 8e120b430b
commit 64928132dd

View File

@@ -49,6 +49,7 @@
, runCommand
, fetchFromGitHub
, substituteAll
, writeShellScript
, writeShellScriptBin
, writeTextDir }:
@@ -171,6 +172,17 @@ let
in (emacsPackages.emacsWithPackages (epkgs: [
load-config-from-site
]));
build-summary = writeShellScript "build-summary" ''
BOLD=\\033[1m
GREEN=\\033[32m
RESET=\\033[0m
printf "\n''${GREEN}Successfully built nix-doom-emacs!''${RESET}\n"
printf "''${BOLD} ==> doom-emacs is installed to ${doom-emacs}''${RESET}\n"
printf "''${BOLD} ==> private configuration is installed to ${doomDir}''${RESET}\n"
printf "''${BOLD} ==> Dependencies are installed to ${doomLocal}''${RESET}\n"
'';
in
emacs.overrideAttrs (esuper:
let cmd = ''
@@ -184,6 +196,7 @@ emacs.overrideAttrs (esuper:
# https://github.com/NixOS/nixpkgs/issues/66706
rm -rf $out/share
ln -s ${esuper.emacs}/share $out
${build-summary}
'';
in
if esuper ? buildCommand then