diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-03-10 12:01:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 12:01:13 +0000 |
commit | cac809141eb742190550d7b627116d2b612686fa (patch) | |
tree | d642d0d9b7ecedf752e818b4d7a1f9473e461ff2 /pkgs/build-support | |
parent | c46a02f95725d864b657dd915c925b246a223f6e (diff) | |
parent | 83580a2e4f57872c25393bdf7e8c14bb402ddca8 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-x | pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh index 55a499370181f..2d02767814e04 100755 --- a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh +++ b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh @@ -8,6 +8,8 @@ if [ $# -eq 0 ]; then fi pkgs=$1 +tmpfile=$(mktemp /tmp/nuget-to-nix.XXXXXX) +trap 'rm -f "$tmpfile" EXIT echo "{ fetchNuGet }: [" @@ -17,7 +19,9 @@ while read pkg_spec; do sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec") pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)" - echo " (fetchNuGet { pname = \"$pkg_name\"; version = \"$pkg_version\"; sha256 = \"$pkg_sha256\"; })" -done < <(find $1 -name '*.nuspec' | sort) + echo " (fetchNuGet { pname = \"$pkg_name\"; version = \"$pkg_version\"; sha256 = \"$pkg_sha256\"; })" >> ${tmpfile} +done < <(find $1 -name '*.nuspec') + +LC_ALL=C sort --ignore-case ${tmpfile} echo "]" |