From 64928132dd0fc203753104cbf8e8be9d9d191da5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Vask=C3=B3?= Date: Fri, 21 Aug 2020 12:23:31 +0200 Subject: [PATCH] nix-doom-emacs: add a summary at the end of build It makes debugging so much easier --- default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/default.nix b/default.nix index bb6e1d7..4b2fc82 100644 --- a/default.nix +++ b/default.nix @@ -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