nixpkgs/pkgs/applications/editors/vscode/extensions/chenglou92.rescript-vscode/default.nix
V 710ddf0ba9 vscode-extensions.*: use hash attribute for SRI hashes
This is a purely syntactical change and should not result in the
recompilation of any packages.

Change-Id: I07adad25402eb0cc84307cab80b74225a11df81d
2024-04-05 23:38:06 +02:00

30 lines
936 B
Nix

{ lib, stdenv, vscode-utils, callPackage }:
let
version = "1.50.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 system: ${stdenv.system}";
analysisDir = "server/analysis_binaries/${arch}";
in
vscode-utils.buildVscodeMarketplaceExtension rec {
mktplcRef = {
name = "rescript-vscode";
publisher = "chenglou92";
inherit version;
hash = "sha256-Dt7mqZQ/vEUFyUD5SsY6RGzg9kq19/Amksrwtfv0TuE=";
};
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;
};
}