Merge pull request #147965 from reckenrode/omnisharp-darwin
This commit is contained in:
commit
f612da79b4
4 changed files with 89 additions and 13 deletions
|
@ -105,11 +105,15 @@ formatExtRuntimeDeps() {
|
||||||
jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)"
|
jsonStorePath="$(echo "$jsonShaWStorePath" | tail -n1)"
|
||||||
1>&2 echo "jsonStorePath='$jsonStorePath'"
|
1>&2 echo "jsonStorePath='$jsonStorePath'"
|
||||||
|
|
||||||
|
# Assume packages without an architectures are for x86_64 and remap arm64 to aarch64.
|
||||||
declare jqQuery
|
declare jqQuery
|
||||||
jqQuery=$(cat <<'EOF'
|
jqQuery=$(cat <<'EOF'
|
||||||
.runtimeDependencies
|
.runtimeDependencies
|
||||||
| map(select(.platforms[] | in({"linux": null})))
|
| map(select(.platforms[] | in({"linux": null, "darwin": null})))
|
||||||
| map(select(.architectures[] | in({"x86_64": null})))
|
| map(select(.architectures == null).architectures |= ["x86_64"])
|
||||||
|
| map(del(.architectures[] | select(. | in({"x86_64": null, "arm64": null}) | not)))
|
||||||
|
| map((.architectures[] | select(. == "arm64")) |= "aarch64")
|
||||||
|
| map(select(.architectures != []))
|
||||||
| .[] | {
|
| .[] | {
|
||||||
(.id + "__" + (.architectures[0]) + "-" + (.platforms[0])):
|
(.id + "__" + (.architectures[0]) + "-" + (.platforms[0])):
|
||||||
{installPath, binaries, urls: [.url, .fallbackUrl] | map(select(. != null))}
|
{installPath, binaries, urls: [.url, .fallbackUrl] | map(select(. != null))}
|
||||||
|
|
|
@ -38,7 +38,13 @@ let
|
||||||
rtDepsBinSrcs."${bSrcName}__${stdenv.targetPlatform.system}";
|
rtDepsBinSrcs."${bSrcName}__${stdenv.targetPlatform.system}";
|
||||||
|
|
||||||
omnisharp = rtDepBinSrcByName "OmniSharp";
|
omnisharp = rtDepBinSrcByName "OmniSharp";
|
||||||
vsdbg = rtDepBinSrcByName "Debugger";
|
vsdbgs = [
|
||||||
|
(rtDepBinSrcByName "Debugger")
|
||||||
|
] ++ lib.optionals (stdenv.isDarwin) [
|
||||||
|
# Include the aarch64-darwin debugger binaries on x86_64-darwin. Even though OmniSharp will be
|
||||||
|
# running under Rosetta 2, debugging will fail to start if both sets of binaries are not present.
|
||||||
|
(rtDepsBinSrcs."Debugger__aarch64-darwin")
|
||||||
|
];
|
||||||
razor = rtDepBinSrcByName "Razor";
|
razor = rtDepBinSrcByName "Razor";
|
||||||
in
|
in
|
||||||
|
|
||||||
|
@ -46,8 +52,8 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||||
mktplcRef = {
|
mktplcRef = {
|
||||||
name = "csharp";
|
name = "csharp";
|
||||||
publisher = "ms-dotnettools";
|
publisher = "ms-dotnettools";
|
||||||
version = "1.23.15";
|
version = "1.23.16";
|
||||||
sha256 = "0b74jr45zl7lzirjgj8s2lbf3viy9pbwlgjh055rcwmy77wcml1x";
|
sha256 = "sha256-fM4vcSMi2tEjIox9Twh2sRiFhXgAeRwAM9to3vtcSqI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -112,20 +118,28 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||||
chmod a+x "$omnisharp_dir/run"
|
chmod a+x "$omnisharp_dir/run"
|
||||||
touch "$omnisharp_dir/install.Lock"
|
touch "$omnisharp_dir/install.Lock"
|
||||||
|
|
||||||
|
'' + builtins.concatStringsSep "\n" (map (vsdbg: ''
|
||||||
declare vsdbg_dir="$PWD/${vsdbg.installPath}"
|
declare vsdbg_dir="$PWD/${vsdbg.installPath}"
|
||||||
unzip_to "${vsdbg.bin-src}" "$vsdbg_dir"
|
unzip_to "${vsdbg.bin-src}" "$vsdbg_dir"
|
||||||
chmod a+x "$vsdbg_dir/vsdbg-ui"
|
chmod a+x "$vsdbg_dir/vsdbg-ui"
|
||||||
chmod a+x "$vsdbg_dir/vsdbg"
|
chmod a+x "$vsdbg_dir/vsdbg"
|
||||||
touch "$vsdbg_dir/install.complete"
|
touch "$vsdbg_dir/install.complete"
|
||||||
touch "$vsdbg_dir/install.Lock"
|
touch "$vsdbg_dir/install.Lock"
|
||||||
patchelf_common "$vsdbg_dir/vsdbg"
|
|
||||||
patchelf_common "$vsdbg_dir/vsdbg-ui"
|
|
||||||
|
|
||||||
|
'') vsdbgs) + ''
|
||||||
declare razor_dir="$PWD/${razor.installPath}"
|
declare razor_dir="$PWD/${razor.installPath}"
|
||||||
unzip_to "${razor.bin-src}" "$razor_dir"
|
unzip_to "${razor.bin-src}" "$razor_dir"
|
||||||
chmod a+x "$razor_dir/rzls"
|
chmod a+x "$razor_dir/rzls"
|
||||||
touch "$razor_dir/install.Lock"
|
touch "$razor_dir/install.Lock"
|
||||||
|
|
||||||
|
'' + lib.optionalString stdenv.isLinux ''
|
||||||
|
patchelf_common "$vsdbg_dir/vsdbg"
|
||||||
|
patchelf_common "$vsdbg_dir/vsdbg-ui"
|
||||||
patchelf_common "$razor_dir/rzls"
|
patchelf_common "$razor_dir/rzls"
|
||||||
|
|
||||||
|
'' + lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace $omnisharp_dir/etc/config \
|
||||||
|
--replace "libmono-native-compat.dylib" "libmono-native.dylib"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -133,6 +147,6 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||||
homepage = "https://github.com/OmniSharp/omnisharp-vscode";
|
homepage = "https://github.com/OmniSharp/omnisharp-vscode";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = [ maintainers.jraygauthier ];
|
maintainers = [ maintainers.jraygauthier ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" "x86_64-darwin" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,63 @@
|
||||||
{
|
{
|
||||||
|
"OmniSharp__x86_64-darwin": {
|
||||||
|
"installPath": ".omnisharp/1.37.16",
|
||||||
|
"binaries": [
|
||||||
|
"./mono.osx",
|
||||||
|
"./run"
|
||||||
|
],
|
||||||
|
"urls": [
|
||||||
|
"https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/0ea1ea1eae48552a1992ed6df782353a/omnisharp-osx-1.37.16.zip",
|
||||||
|
"https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-osx-1.37.16.zip"
|
||||||
|
],
|
||||||
|
"sha256": "0hhgfx7zs1rljhn3n9c7lci7j15yp2448z3f1d3c47a95l1hmlip"
|
||||||
|
},
|
||||||
"OmniSharp__x86_64-linux": {
|
"OmniSharp__x86_64-linux": {
|
||||||
"installPath": ".omnisharp/1.37.15",
|
"installPath": ".omnisharp/1.37.16",
|
||||||
"binaries": [
|
"binaries": [
|
||||||
"./mono.linux-x86_64",
|
"./mono.linux-x86_64",
|
||||||
"./run"
|
"./run"
|
||||||
],
|
],
|
||||||
"urls": [
|
"urls": [
|
||||||
"https://download.visualstudio.microsoft.com/download/pr/4fbf71ce-5375-4ca9-b70d-8024ba1b9e0a/b96375395e639233d546a4937be3bd32/omnisharp-linux-x64-1.37.15.zip",
|
"https://download.visualstudio.microsoft.com/download/pr/03c32aa6-7c7a-4936-82a0-fd8f816d112f/9ae3ed99fc0c41c7139751dde6f2bc78/omnisharp-linux-x64-1.37.16.zip",
|
||||||
"https://roslynomnisharp.blob.core.windows.net/releases/1.37.15/omnisharp-linux-x64-1.37.15.zip"
|
"https://roslynomnisharp.blob.core.windows.net/releases/1.37.16/omnisharp-linux-x64-1.37.16.zip"
|
||||||
],
|
],
|
||||||
"sha256": "0pchywkxy8niq0i6gq2r43cmf58blfhhj8w8zyibf0m9h09h165s"
|
"sha256": "0a2basc6dw42fnjv9zz93ff0bsw2i3446gvcjx5mn5d8dasi483i"
|
||||||
|
},
|
||||||
|
"Debugger__x86_64-darwin": {
|
||||||
|
"installPath": ".debugger/x86_64",
|
||||||
|
"binaries": [
|
||||||
|
"./vsdbg-ui",
|
||||||
|
"./vsdbg"
|
||||||
|
],
|
||||||
|
"urls": [
|
||||||
|
"https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/c1122f7141735472d9583c1124024c55/coreclr-debug-osx-x64.zip",
|
||||||
|
"https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-x64.zip"
|
||||||
|
],
|
||||||
|
"sha256": "08z3k0h25gdsbmlxwayd94672hp2z7zmwdmd0nyr9j82izj3ci2m"
|
||||||
|
},
|
||||||
|
"Debugger__aarch64-darwin": {
|
||||||
|
"installPath": ".debugger/arm64",
|
||||||
|
"binaries": [
|
||||||
|
"./vsdbg-ui",
|
||||||
|
"./vsdbg"
|
||||||
|
],
|
||||||
|
"urls": [
|
||||||
|
"https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/96a88189c7904a517f3bb59b2dba8bd1/coreclr-debug-osx-arm64.zip",
|
||||||
|
"https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-osx-arm64.zip"
|
||||||
|
],
|
||||||
|
"sha256": "113kz02ihvb4y5fj01wamqz2jsql2q7n7f55s9kzs9dsrmq5ffa0"
|
||||||
|
},
|
||||||
|
"Debugger__aarch64-linux": {
|
||||||
|
"installPath": ".debugger",
|
||||||
|
"binaries": [
|
||||||
|
"./vsdbg-ui",
|
||||||
|
"./vsdbg"
|
||||||
|
],
|
||||||
|
"urls": [
|
||||||
|
"https://download.visualstudio.microsoft.com/download/pr/49f44239-bd47-4fb5-91be-4c91d7638fff/7a723bfbda6d196c52084226b6835b36/coreclr-debug-linux-arm64.zip",
|
||||||
|
"https://vsdebugger.blob.core.windows.net/coreclr-debug-1-23-14/coreclr-debug-linux-arm64.zip"
|
||||||
|
],
|
||||||
|
"sha256": "1d4a5q3f7qfk3jq2i4f6g50i9i4z8z7g8ss083y9n5c1yj3629kw"
|
||||||
},
|
},
|
||||||
"Debugger__x86_64-linux": {
|
"Debugger__x86_64-linux": {
|
||||||
"installPath": ".debugger",
|
"installPath": ".debugger",
|
||||||
|
@ -32,5 +80,15 @@
|
||||||
"https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/b846e9c7d7afdba54a72fae1dcb6c42c/razorlanguageserver-linux-x64-6.0.0-preview.5.21358.6.zip"
|
"https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/b846e9c7d7afdba54a72fae1dcb6c42c/razorlanguageserver-linux-x64-6.0.0-preview.5.21358.6.zip"
|
||||||
],
|
],
|
||||||
"sha256": "0gb36nlb7fgcv03a0awna1qyrsky6ys5gkpsmvxc5j35f1yq337b"
|
"sha256": "0gb36nlb7fgcv03a0awna1qyrsky6ys5gkpsmvxc5j35f1yq337b"
|
||||||
|
},
|
||||||
|
"Razor__x86_64-darwin": {
|
||||||
|
"installPath": ".razor",
|
||||||
|
"binaries": [
|
||||||
|
"./rzls"
|
||||||
|
],
|
||||||
|
"urls": [
|
||||||
|
"https://download.visualstudio.microsoft.com/download/pr/b8678010-2cd7-4201-a5e7-ba57920607d5/ad846449769eb2ae810d0236823a6aaa/razorlanguageserver-osx-x64-6.0.0-preview.5.21358.6.zip"
|
||||||
|
],
|
||||||
|
"sha256": "0iqinpwwlqwajdq4i1qbb9hfpfmgy17av95bpw02ad2f9fnyh572"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ scriptDir=$(cd "$(dirname "$0")"; pwd)
|
||||||
|
|
||||||
declare extPublisher="ms-dotnettools"
|
declare extPublisher="ms-dotnettools"
|
||||||
declare extName="csharp"
|
declare extName="csharp"
|
||||||
declare defaultExtVersion="1.23.15"
|
declare defaultExtVersion="1.23.16"
|
||||||
declare extVersion="${1:-$defaultExtVersion}"
|
declare extVersion="${1:-$defaultExtVersion}"
|
||||||
|
|
||||||
formatExtRuntimeDeps \
|
formatExtRuntimeDeps \
|
||||||
|
|
Loading…
Reference in a new issue