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 , version
, sha512 , sha512
}: }:
assert builtins.elem type [ "aspnetcore" "netcore" "sdk"]; assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
{ stdenv { stdenv
, fetchurl , fetchurl
@ -12,7 +13,9 @@ assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
, zlib , zlib
, curl , 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"; platform = if stdenv.isDarwin then "osx" else "linux";
suffix = { suffix = {
x86_64-linux = "x64"; x86_64-linux = "x64";