Skip to content

Commit

Permalink
nuget-to-nix: comply with RFC 0166 when generating .nix files
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <[email protected]>
  • Loading branch information
Scrumplex committed Sep 5, 2024
1 parent fa16ed9 commit 6475f70
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for index in "${sources[@]}"; do
base_addresses[$index]="$base_address"
done

echo "{ fetchNuGet }: ["
echo -e "{ fetchNuGet }:\n["

cd "$pkgs"
for package in *; do
Expand Down Expand Up @@ -93,11 +93,14 @@ for package in *; do
exit 1
fi

echo " (fetchNuGet {"
echo " pname = \"$id\";"
echo " version = \"$version\";"
echo " hash = \"$hash\";"
if [[ "$source" != https://api.nuget.org/v3/index.json ]]; then
echo " (fetchNuGet { pname = \"$id\"; version = \"$version\"; hash = \"$hash\"; url = \"$url\"; })"
else
echo " (fetchNuGet { pname = \"$id\"; version = \"$version\"; hash = \"$hash\"; })"
echo " url = \"$url\";"
fi
echo " })"
done
cd ..
done
Expand Down

0 comments on commit 6475f70

Please sign in to comment.