From 1b2d45b6ac68d8943c9b371b4e04a5acd6b2813f Mon Sep 17 00:00:00 2001 From: David McFarland Date: Wed, 29 Apr 2026 09:05:01 -0300 Subject: [PATCH] nuget-to-json: don't add packages with only contentHash Fixes: bfc94a6c9e64bffc75e3d936413209c42b3b7923 --- pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh b/pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh index c4c5a8d9456b..111899dac47f 100755 --- a/pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh +++ b/pkgs/by-name/nu/nuget-to-json/nuget-to-json.sh @@ -61,9 +61,9 @@ done continue fi - # packages in the nix store should have an empty metadata file + # packages in the nix store should have a metadata file without 'version' (see createNupkgMetadata) # packages installed with 'dotnet tool' may be missing 'source' - used_source="$(jq -r 'if has("source") then .source elif has("contentHash") then "__unknown" else "" end' "$version"/.nupkg.metadata)" + used_source="$(jq -r 'if has("source") then .source elif has("version") then "__unknown" else "" end' "$version"/.nupkg.metadata)" found=false if [[ -z "$used_source" || -d "$used_source" ]]; then