From 84a7dba79f9f92c87d856f86918871a1e9680244 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 23 Sep 2021 20:01:18 +0200 Subject: dotnet: rework platforms to allow aarch64-darwin --- pkgs/development/compilers/dotnet/build-dotnet.nix | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'pkgs/development/compilers/dotnet') diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix index 38c2fae6034..3080873bb96 100644 --- a/pkgs/development/compilers/dotnet/build-dotnet.nix +++ b/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -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; }; -- cgit 1.4.1