nixpkgs/pkgs/applications/editors/vscode/extensions/rescript/default.nix
Jayesh Bhoot cc5159e589 vscode-extensions.chenglou92.rescript-vscode: 1.3.0 -> 1.6.0
This upgrade also brings the version of the subpackage
rescript-editor-analysis on par with rescript-vscode.
2022-09-23 18:31:21 +05:30

30 lines
913 B
Nix

{ lib, stdenv, vscode-utils, callPackage }:
let
version = "1.6.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-/Nv+uyTkJQVaPKIDRr1P/Z5vsituXpP48/sDn3FUEeA=";
};
postPatch = ''
rm -r ${analysisDir}
ln -s ${rescript-editor-analysis}/bin ${analysisDir}
'';
meta = with lib; {
description = "The official VSCode plugin for ReScript";
homepage = "https://github.com/rescript-lang/rescript-vscode";
maintainers = with maintainers; [ dlip jayesh-bhoot ];
license = licenses.mit;
};
}