Last active
August 12, 2019 14:16
-
-
Save flokli/b9377bfb4b7e0ce2d6dc8bd3243e3104 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
nixBuild() { | |
DRV=$(nix-instantiate "$@"); | |
nix-build $DRV --builders "" --no-out-link; | |
S=$?; | |
if [ $S -ne 0 ]; then | |
# trigger a git bisect bad if the bad line was found | |
nix log $DRV | grep -i "has terminated unexpectedly during startup" && exit 42; | |
# else trigger a skip (some other random build failure) | |
exit 125; | |
fi; | |
# build was successful | |
exit 0 | |
} | |
nixBuild nixos/tests/virtualbox.nix -A simple-cli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment