summary refs log tree commit diff
path: root/pkgs/development/compilers/dotnet/build-dotnet.nix
diff options
context:
space:
mode:
authorPavol Rusnak <pavol@rusnak.io>2021-09-23 20:01:18 +0200
committerPavol Rusnak <pavol@rusnak.io>2021-10-20 21:54:03 +0200
commit84a7dba79f9f92c87d856f86918871a1e9680244 (patch)
treebeb8811b85f0a5d0719eea3bc8e74719035ebc9e /pkgs/development/compilers/dotnet/build-dotnet.nix
parent18b39d6b57c2778af0eaff2d970911a46b188303 (diff)
downloadnixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar.gz
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar.bz2
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar.lz
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar.xz
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.tar.zst
nixpkgs-84a7dba79f9f92c87d856f86918871a1e9680244.zip
dotnet: rework platforms to allow aarch64-darwin
Diffstat (limited to 'pkgs/development/compilers/dotnet/build-dotnet.nix')
-rw-r--r--pkgs/development/compilers/dotnet/build-dotnet.nix21
1 files changed, 10 insertions, 11 deletions
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;
   };