summary refs log tree commit diff
path: root/pkgs/development/compilers/dotnet/build-dotnet.nix
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-09-12 00:02:43 +0000
committerGitHub <noreply@github.com>2022-09-12 00:02:43 +0000
commit33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e (patch)
tree26a436b514129e065a7546d0c63829633721bb0a /pkgs/development/compilers/dotnet/build-dotnet.nix
parent6ec60fd2225cf57a06129b9bca02b10d4db4271f (diff)
parentfaa93c4e19e79e7a6de31d6d3492b8f00760ca82 (diff)
downloadnixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar.gz
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar.bz2
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar.lz
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar.xz
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.tar.zst
nixpkgs-33ef8defa266373b55e2bc96a9c0bf51c0d5eb3e.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/development/compilers/dotnet/build-dotnet.nix')
-rw-r--r--pkgs/development/compilers/dotnet/build-dotnet.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix
index 6cc7dace6f1..37be33c2263 100644
--- a/pkgs/development/compilers/dotnet/build-dotnet.nix
+++ b/pkgs/development/compilers/dotnet/build-dotnet.nix
@@ -105,8 +105,18 @@ stdenv.mkDerivation rec {
     export DOTNET_CLI_TELEMETRY_OPTOUT=1
   '';
 
-  passthru = {
+  passthru = rec {
     inherit icu packages;
+
+    runtimeIdentifierMap = {
+      "x86_64-linux" = "linux-x64";
+      "aarch64-linux" = "linux-arm64";
+      "x86_64-darwin" = "osx-x64";
+      "aarch64-darwin" = "osx-arm64";
+    };
+
+    # Convert a "stdenv.hostPlatform.system" to a dotnet RID
+    systemToDotnetRid = system: runtimeIdentifierMap.${system} or (throw "unsupported platform ${system}");
   };
 
   meta = with lib; {