nixpkgs/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix
Jayesh Bhoot 97fab1a38c
chenglou92.rescript-vscode: 1.8.1 -> 1.16.0 (#231648)
Co-authored-by: Jayesh Bhoot <jayesh@bhoot.sh>
2023-05-15 17:04:46 +02:00

30 lines
922 B
Nix

{ lib, stdenv, vscode-utils, callPackage }:
let
version = "1.16.0";
rescript-editor-analysis = callPackage ./rescript-editor-analysis.nix { inherit version; };
arch =
if stdenv.isLinux then "linux"
else if stdenv.isDarwin then "darwin"
else throw "Unsupported platform";
analysisDir = "server/analysis_binaries/${arch}";
in
vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {
name = "rescript-vscode";
publisher = "chenglou92";
inherit version;
sha256 = "sha256-JoC9+NkbLAZXkOKDDMB0Xgzmn+w90pHcokerMrdACi4=";
};
postPatch = ''
rm -r ${analysisDir}
ln -s ${rescript-editor-analysis}/bin ${analysisDir}
'';
meta = {
description = "The official VSCode plugin for ReScript";
homepage = "https://github.com/rescript-lang/rescript-vscode";
maintainers = [ lib.maintainers.dlip lib.maintainers.jayesh-bhoot ];
license = lib.licenses.mit;
};
}