diff options
Diffstat (limited to 'libs.nix')
-rw-r--r-- | libs.nix | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | { nixpkgs }: | 1 | { pkgs }: |
2 | with nixpkgs; | 2 | with pkgs; |
3 | rec { | 3 | rec { |
4 | yarn2nixPackage = let | 4 | yarn2nixPackage = let |
5 | src = fetchFromGitHub { | 5 | src = fetchFromGitHub { |
@@ -57,4 +57,22 @@ rec { | |||
57 | makeWrapper "$f" "$out" ${toString args} | 57 | makeWrapper "$f" "$out" ${toString args} |
58 | ''; | 58 | ''; |
59 | 59 | ||
60 | # This adds header colors to the builds, but it rebuilds the whole | ||
61 | # world from scratch, so only use it to debug! | ||
62 | # add it as postHook in derivations | ||
63 | immaePostHook = '' | ||
64 | header() { | ||
65 | echo -ne "\033[1;36m" | ||
66 | echo -n "$1" | ||
67 | echo -e "\033[0m" | ||
68 | } | ||
69 | |||
70 | echoCmd() { | ||
71 | printf "\033[1;34m%s:\033[0m" "$1" | ||
72 | shift | ||
73 | printf ' %q' "$@" | ||
74 | echo | ||
75 | } | ||
76 | ''; | ||
77 | |||
60 | } | 78 | } |