use nix-output-monitor if available

This commit is contained in:
Charles Hall 2024-04-30 00:55:57 -07:00
parent f205280520
commit ce5ce60dd9
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF

View file

@ -5,8 +5,13 @@ set -euo pipefail
# The first argument must be the desired installable # The first argument must be the desired installable
INSTALLABLE="$1" INSTALLABLE="$1"
# Build the installable and forward any other arguments too # Build the installable and forward any other arguments too. Also, use
nix build "$@" # nix-output-monitor instead if it's available.
if command -v nom &> /dev/null; then
nom build "$@"
else
nix build "$@"
fi
if [ ! -z ${ATTIC_TOKEN+x} ]; then if [ ! -z ${ATTIC_TOKEN+x} ]; then
nix run --inputs-from . attic -- \ nix run --inputs-from . attic -- \