nuget-to-nix: use xmlstarlet instead of xq (yq)

xq has such a long startup time that this significantly improves
performance.
This commit is contained in:
David McFarland 2024-09-08 21:42:34 -03:00
parent c693cb8ec6
commit e6bca73d01
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
, nix
, coreutils
, jq
, yq
, xmlstarlet
, curl
, gnugrep
, gawk
@ -21,7 +21,7 @@ runCommandLocal "nuget-to-nix" {
nix
coreutils
jq
yq
xmlstarlet
curl
gnugrep
gawk

View File

@ -51,7 +51,7 @@ for package in *; do
[[ -d "$package" ]] || continue
cd "$package"
for version in *; do
id=$(xq -r .package.metadata.id "$version"/*.nuspec)
id=$(xmlstarlet sel -t -v /_:package/_:metadata/_:id "$version"/*.nuspec)
if grep -qxF "$id.$version.nupkg" "$excluded_list"; then
continue