update-flake-lock/update-input-or-inputs.sh
2021-12-01 10:42:07 -08:00

12 lines
249 B
Bash
Executable file

#!/usr/bin/env bash
to_update=$*
if [ -n "$to_update" ]; then
inputs=()
for input in $to_update; do
inputs+=("--update-input" "$input")
done
nix flake lock "${inputs[@]}" --commit-lock-file
else
nix flake update --commit-lock-file
fi