[Backport release-25.05] vscode-extensions.reditorsupport.r: install languageserver correctly (#419880)

This commit is contained in:
Pol Dellaiera
2025-06-25 22:58:34 +02:00
committed by GitHub

View File

@@ -3,8 +3,11 @@
vscode-utils,
jq,
moreutils,
python311Packages,
languageserver ? rPackages.languageserver,
R,
radian ? python311Packages.radian,
python311Packages,
rPackages,
}:
@@ -19,17 +22,13 @@ vscode-utils.buildVscodeMarketplaceExtension {
jq
moreutils
];
buildInputs = [
python311Packages.radian
R
rPackages.languageserver
];
postInstall = ''
cd "$out/$installPrefix"
jq '.contributes.configuration.properties."r.rpath.mac".default = "${lib.getExe' R "R"}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rpath.linux".default = "${lib.getExe' R "R"}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.mac".default = "${lib.getExe python311Packages.radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.linux".default = "${lib.getExe python311Packages.radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.mac".default = "${lib.getExe radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.rterm.linux".default = "${lib.getExe radian}"' package.json | sponge package.json
jq '.contributes.configuration.properties."r.libPaths".default = [ "${languageserver}/library" ]' package.json | sponge package.json
'';
meta = {
changelog = "https://marketplace.visualstudio.com/items/REditorSupport.r/changelog";