Skip to content

Commit

Permalink
buildDotnetModule: add support for installing pre-release tools
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelj committed Jan 18, 2025
1 parent 005b37d commit 5edf781
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ buildDotnetModule (
installPhase = ''
runHook preInstall
dotnet tool install --tool-path $out/lib/${pname} ${nugetName}
dotnet tool install --tool-path $out/lib/${pname} ${nugetName} --version ${version}
# remove files that contain nix store paths to temp nuget sources we made
find $out -name 'project.assets.json' -delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ nugetName=$(nixeval "$attr.nupkg.pname")

# always skip prerelease versions for now
version=$(curl -fsSL "https://api.nuget.org/v3-flatcontainer/$nugetName/index.json" |
jq -er '.versions | last(.[] | select(match("^[0-9]+\\.[0-9]+\\.[0-9]+$")))')
jq -er '.versions | last(.[] | select(match("^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$")))')

if [[ $version == $(nixeval "$attr.version") ]]; then
echo "$attr" is already version "$version"
Expand Down

0 comments on commit 5edf781

Please sign in to comment.