diff options
Diffstat (limited to 'bild')
-rwxr-xr-x | bild | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -1,8 +1,11 @@ #!/usr/bin/env bash -nix build -o "_bild/$@" -f default.nix "$@" -if [[ $? != 0 ]] +set -ex +prefix=$(echo $PWD | sed -e "s|^$BIZ_ROOT/*||g" -e "s|/|.|g") +if [[ "$prefix" == "" ]] then - echo ":: bild fail" - echo ":: replaying the log..." - PAGER=cat nix log -f default.nix "$@" + target="$1" +else + target="$prefix.$1" fi +nix build -o "$BIZ_ROOT/_bild/$target" \ + -f $BIZ_ROOT/default.nix "$target" --show-trace |