Allow consumers to update specific flake inputs

This commit is contained in:
Cole Helbling 2021-11-29 11:10:08 -08:00
parent 8145cc6e00
commit 1b8dad2bd0
2 changed files with 18 additions and 1 deletions

12
update-input-or-inputs.sh Executable file
View file

@ -0,0 +1,12 @@
#!/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