summary refs log tree commit diff
path: root/pkgs/development/compilers/dotnet/build-dotnet.nix
diff options
context:
space:
mode:
authorTony Höglund <tony.hoglund@gmail.com>2022-03-14 12:49:47 +0100
committerTony Höglund <tony.hoglund@gmail.com>2022-03-18 07:24:52 +0100
commit9a35f3f1b439c99679e6257c5639c1d15fc680be (patch)
tree22d3b18ba044ce39bec230c16840a590b8e0df2d /pkgs/development/compilers/dotnet/build-dotnet.nix
parentfeaf7086346185d51ce61a52b8e6eaeb8204cc83 (diff)
downloadnixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar.gz
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar.bz2
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar.lz
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar.xz
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.tar.zst
nixpkgs-9a35f3f1b439c99679e6257c5639c1d15fc680be.zip
dotnetCorePackages.*_6*: 6.0.0 -> 6.0.3
Diffstat (limited to 'pkgs/development/compilers/dotnet/build-dotnet.nix')
-rw-r--r--pkgs/development/compilers/dotnet/build-dotnet.nix23
1 files changed, 5 insertions, 18 deletions
diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix
index 4c2464f8eee..bfc2ab7f9b0 100644
--- a/pkgs/development/compilers/dotnet/build-dotnet.nix
+++ b/pkgs/development/compilers/dotnet/build-dotnet.nix
@@ -1,6 +1,6 @@
 { type
 , version
-, sha512
+, srcs
 }:
 
 assert builtins.elem type [ "aspnetcore" "runtime" "sdk"];
@@ -25,17 +25,7 @@ let
     "dotnet-runtime"
   else
     "dotnet-sdk";
-  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}.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}";
     runtime = ".NET Runtime ${version}";
@@ -58,11 +48,8 @@ in stdenv.mkDerivation rec {
     lttng-ust_2_12
   ]);
 
-  src = fetchurl {
-    url = builtins.getAttr type urls;
-    sha512 = sha512."${stdenv.hostPlatform.system}" or (throw
-      "Missing hash for host system: ${stdenv.hostPlatform.system}");
-  };
+  src = fetchurl (srcs."${stdenv.hostPlatform.system}" or (throw
+    "Missing source (url and hash) for host system: ${stdenv.hostPlatform.system}"));
 
   sourceRoot = ".";
 
@@ -102,7 +89,7 @@ in stdenv.mkDerivation rec {
   meta = with lib; {
     homepage = "https://dotnet.github.io/";
     description = builtins.getAttr type descriptions;
-    platforms = builtins.attrNames sha512;
+    platforms = builtins.attrNames srcs;
     maintainers = with maintainers; [ kuznero ];
     license = licenses.mit;
   };