dotnet-sdk: add passthru attribute to generate a runtime ID

This commit is contained in:
Ivar Scholten 2022-09-07 22:53:07 +02:00
parent fbac99137c
commit 0d8a23bfcd
No known key found for this signature in database
GPG key ID: E22887AD87C33E3C

View file

@ -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; {