buildDotnet.nix: refactor

This commit is contained in:
Jonathan Ringer 2020-07-16 14:02:04 -07:00 committed by Jon
parent c32264ef79
commit a65cc6346d

View file

@ -2,6 +2,7 @@
, version
, sha512
}:
assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
{ stdenv
, fetchurl
@ -12,7 +13,9 @@ assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
, zlib
, curl
}:
let pname = if type == "aspnetcore" then "aspnetcore-runtime" else if type == "netcore" then "dotnet-runtime" else "dotnet-sdk";
let
pname = if type == "aspnetcore" then "aspnetcore-runtime" else if type == "netcore" then "dotnet-runtime" else "dotnet-sdk";
platform = if stdenv.isDarwin then "osx" else "linux";
suffix = {
x86_64-linux = "x64";