diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/default.nix | 20 | ||||
-rw-r--r-- | lib/private/default.nix | 20 |
2 files changed, 21 insertions, 19 deletions
diff --git a/lib/default.nix b/lib/default.nix index 1baee1f..6b3dfdf 100644 --- a/lib/default.nix +++ b/lib/default.nix | |||
@@ -61,22 +61,4 @@ rec { | |||
61 | makeWrapper "$f" "$out" ${toString args} | 61 | makeWrapper "$f" "$out" ${toString args} |
62 | ''; | 62 | ''; |
63 | 63 | ||
64 | # This adds header colors to the builds, but it rebuilds the whole | 64 | } // (if builtins.pathExists ./private then callPackage ./private {} else {}) |
65 | # world from scratch, so only use it to debug! | ||
66 | # add it as postHook in derivations | ||
67 | immaePostHook = '' | ||
68 | header() { | ||
69 | echo -ne "\033[1;36m" | ||
70 | echo -n "$1" | ||
71 | echo -e "\033[0m" | ||
72 | } | ||
73 | |||
74 | echoCmd() { | ||
75 | printf "\033[1;34m%s:\033[0m" "$1" | ||
76 | shift | ||
77 | printf ' %q' "$@" | ||
78 | echo | ||
79 | } | ||
80 | ''; | ||
81 | |||
82 | } // (if builtins.pathExists ./lib/private then import ./lib/private else {}) | ||
diff --git a/lib/private/default.nix b/lib/private/default.nix new file mode 100644 index 0000000..c7d753a --- /dev/null +++ b/lib/private/default.nix | |||
@@ -0,0 +1,20 @@ | |||
1 | {}: | ||
2 | { | ||
3 | # This adds header colors to the builds, but it rebuilds the whole | ||
4 | # world from scratch, so only use it to debug! | ||
5 | # add it as postHook in derivations | ||
6 | immaePostHook = '' | ||
7 | header() { | ||
8 | echo -ne "\033[1;36m" | ||
9 | echo -n "$1" | ||
10 | echo -e "\033[0m" | ||
11 | } | ||
12 | |||
13 | echoCmd() { | ||
14 | printf "\033[1;34m%s:\033[0m" "$1" | ||
15 | shift | ||
16 | printf ' %q' "$@" | ||
17 | echo | ||
18 | } | ||
19 | ''; | ||
20 | } | ||