refactor(update-script): Switch from nvfetcher to nix-update
This commit is contained in:
parent
099666d14d
commit
8757f2ad22
8 changed files with 91 additions and 102 deletions
23
pkgs/update.nu
Normal file
23
pkgs/update.nu
Normal 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'
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue