refactor(update-script): Switch from nvfetcher to nix-update

This commit is contained in:
Tristan Daniël Maat 2025-09-29 13:08:07 +08:00
parent 099666d14d
commit 8757f2ad22
Signed by: tlater
GPG key ID: 49670FD774E43268
8 changed files with 91 additions and 102 deletions

23
pkgs/update.nu Normal file
View file

@ -0,0 +1,23 @@
use std/log
let packages_with_updatescript = (
nix flake show --json
| from json
| $in.packages.x86_64-linux
| columns
| filter {|p| nix eval $'.#($p)' --apply 'builtins.hasAttr "updateScript"' | $in == 'true' }
)
for $package in $packages_with_updatescript {
log info $'Updating ($package)'
nix run $'.#($package).updateScript'
}
log info 'Committing changes'
try {
git add pkgs
git commit -m 'update(pkgs): Update sources of all downstream packages'
} catch {
log warning 'No changes to commit'
}