diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-16 12:49:17 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-02-16 12:49:17 +0100 |
commit | a556c4b01a536afd90042dad95e7cc09f37d4056 (patch) | |
tree | 7cf071b676e9add3e9f4c736faaa2d66b578583e /config | |
parent | ea9d3f4ba1cfcab0eeb9cb719fc8065d38c3bb53 (diff) | |
download | Nix-a556c4b01a536afd90042dad95e7cc09f37d4056.tar.gz Nix-a556c4b01a536afd90042dad95e7cc09f37d4056.tar.zst Nix-a556c4b01a536afd90042dad95e7cc09f37d4056.zip |
Add postHook to colorize build outputs
Diffstat (limited to 'config')
-rw-r--r-- | config/config.nix | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/config/config.nix b/config/config.nix index 0b57835..d6b4714 100644 --- a/config/config.nix +++ b/config/config.nix | |||
@@ -9,5 +9,22 @@ | |||
9 | pathsToLink = [ "/bin" "/etc" "/include" "/lib" "/libexec" "/share"]; | 9 | pathsToLink = [ "/bin" "/etc" "/include" "/lib" "/libexec" "/share"]; |
10 | extraOutputsToInstall = [ "bin" "man" "doc" "info" ]; | 10 | extraOutputsToInstall = [ "bin" "man" "doc" "info" ]; |
11 | }; | 11 | }; |
12 | # This adds header colors to the builds, but it rebuilds the whole | ||
13 | # world from scratch, so only use it to debug! | ||
14 | # add it as postHook in derivations | ||
15 | immaePostHook = '' | ||
16 | header() { | ||
17 | echo -ne "\033[1;36m" | ||
18 | echo -n "$1" | ||
19 | echo -e "\033[0m" | ||
20 | } | ||
21 | |||
22 | echoCmd() { | ||
23 | printf "\033[1;34m%s:\033[0m" "$1" | ||
24 | shift | ||
25 | printf ' %q' "$@" | ||
26 | echo | ||
27 | } | ||
28 | ''; | ||
12 | }; | 29 | }; |
13 | } | 30 | } |