dotnet: rework platforms to allow aarch64-darwin

conduit-nginx
Pavol Rusnak 2021-09-23 20:01:18 +02:00
parent 18b39d6b57
commit 84a7dba79f
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 10 additions and 11 deletions

View File

@ -21,17 +21,16 @@ let
"dotnet-runtime"
else
"dotnet-sdk";
platform = if stdenv.isDarwin then "osx" else "linux";
suffix = {
x86_64-linux = "x64";
aarch64-linux = "arm64";
x86_64-darwin = "x64";
}."${stdenv.hostPlatform.system}" or (throw
"Unsupported system: ${stdenv.hostPlatform.system}");
platform = {
x86_64-linux = "linux-x64";
aarch64-linux = "linux-arm64";
x86_64-darwin = "osx-x64";
aarch64-darwin = "osx-arm64";
}.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
urls = {
aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
runtime = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}.tar.gz";
runtime = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}.tar.gz";
sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}.tar.gz";
};
descriptions = {
aspnetcore = "ASP.NET Core Runtime ${version}";
@ -85,7 +84,7 @@ in stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://dotnet.github.io/";
description = builtins.getAttr type descriptions;
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
platforms = builtins.attrNames sha512;
maintainers = with maintainers; [ kuznero ];
license = licenses.mit;
};