aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-08 15:36:08 +0200
committerGitHub <noreply@github.com>2022-07-08 13:36:08 +0000
commit8c0c47b2dbecc20c0348784121d0c39b4a01c43c (patch)
tree5aedd779a510c07f3d93eb243156b00f9d3655fe /lua
parentchore: update php-debug-adapter description (#19) (diff)
downloadmason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar.gz
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar.bz2
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar.lz
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar.xz
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.tar.zst
mason-8c0c47b2dbecc20c0348784121d0c39b4a01c43c.zip
feat: add netcoredbg (#21)
Diffstat (limited to 'lua')
-rw-r--r--lua/mason/_generated/package_index.lua1
-rw-r--r--lua/mason/packages/netcoredbg/init.lua43
2 files changed, 44 insertions, 0 deletions
diff --git a/lua/mason/_generated/package_index.lua b/lua/mason/_generated/package_index.lua
index 9c2642db..bfbb7a9b 100644
--- a/lua/mason/_generated/package_index.lua
+++ b/lua/mason/_generated/package_index.lua
@@ -74,6 +74,7 @@ return {
marksman = "mason.packages.marksman",
["metamath-zero-lsp"] = "mason.packages.metamath-zero-lsp",
mockdebug = "mason.packages.mockdebug",
+ netcoredbg = "mason.packages.netcoredbg",
["nickel-lang-lsp"] = "mason.packages.nickel-lang-lsp",
nimlsp = "mason.packages.nimlsp",
["node-debug2-adapter"] = "mason.packages.node-debug2-adapter",
diff --git a/lua/mason/packages/netcoredbg/init.lua b/lua/mason/packages/netcoredbg/init.lua
new file mode 100644
index 00000000..55f34aff
--- /dev/null
+++ b/lua/mason/packages/netcoredbg/init.lua
@@ -0,0 +1,43 @@
+local Pkg = require "mason.core.package"
+local github = require "mason.core.managers.github"
+local _ = require "mason.core.functional"
+local path = require "mason.core.path"
+local platform = require "mason.core.platform"
+
+return Pkg.new {
+ name = "netcoredbg",
+ desc = [[NetCoreDbg is a managed code debugger with MI interface for CoreCLR.]],
+ homepage = "https://github.com/Samsung/netcoredbg",
+ languages = { Pkg.Lang[".NET"], Pkg.Lang["C#"] },
+ categories = { Pkg.Cat.DAP },
+ ---@async
+ ---@param ctx InstallContext
+ install = function(ctx)
+ platform.when {
+ unix = function()
+ github
+ .untargz_release_file({
+ repo = "Samsung/netcoredbg",
+ asset_file = _.coalesce(
+ _.when(platform.is.mac, "netcoredbg-osx-amd64.tar.gz"),
+ _.when(platform.is.linux_x64, "netcoredbg-linux-amd64.tar.gz"),
+ _.when(platform.is.linux_arm64, "netcoredbg-linux-arm64.tar.gz")
+ ),
+ })
+ .with_receipt()
+ ctx.fs:rename("netcoredbg", "build")
+ ctx:write_exec_wrapper("netcoredbg", path.concat { "build", "netcoredbg" })
+ ctx:link_bin("netcoredbg", "netcoredbg")
+ end,
+ win = function()
+ github
+ .unzip_release_file({
+ repo = "Samsung/netcoredbg",
+ asset_file = _.when(platform.is.win_x64, "netcoredbg-win64.zip"),
+ })
+ .with_receipt()
+ ctx:link_bin("netcoredbg", path.concat { "netcoredbg", "netcoredbg.exe" })
+ end,
+ }
+ end,
+}