X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=libs.nix;h=630b139c2c60238ab81e6d6042e00c5be92f7101;hp=981039ec2d1b354e43da3fca3d6f9ce349f44f9b;hb=fdf6f74d3221e3dad853898f296149baea0aa476;hpb=6e2dc958bc8c5aac4871d2a618741fa4628ed126 diff --git a/libs.nix b/libs.nix index 981039e..630b139 100644 --- a/libs.nix +++ b/libs.nix @@ -1,5 +1,5 @@ -{ nixpkgs }: -with nixpkgs; +{ pkgs }: +with pkgs; rec { yarn2nixPackage = let src = fetchFromGitHub { @@ -57,4 +57,22 @@ rec { makeWrapper "$f" "$out" ${toString args} ''; + # This adds header colors to the builds, but it rebuilds the whole + # world from scratch, so only use it to debug! + # add it as postHook in derivations + immaePostHook = '' + header() { + echo -ne "\033[1;36m" + echo -n "$1" + echo -e "\033[0m" + } + + echoCmd() { + printf "\033[1;34m%s:\033[0m" "$1" + shift + printf ' %q' "$@" + echo + } + ''; + }