mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
Merge pull request #140433 from dlip/vscode-rescript
This commit is contained in:
commit
9e672a7086
|
@ -2885,6 +2885,12 @@
|
||||||
githubId = 28980797;
|
githubId = 28980797;
|
||||||
name = "David Leslie";
|
name = "David Leslie";
|
||||||
};
|
};
|
||||||
|
dlip = {
|
||||||
|
email = "dane@lipscombe.com.au";
|
||||||
|
github = "dlip";
|
||||||
|
githubId = 283316;
|
||||||
|
name = "Dane Lipscombe";
|
||||||
|
};
|
||||||
dmalikov = {
|
dmalikov = {
|
||||||
email = "malikov.d.y@gmail.com";
|
email = "malikov.d.y@gmail.com";
|
||||||
github = "dmalikov";
|
github = "dmalikov";
|
||||||
|
|
|
@ -316,6 +316,8 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
chenglou92.rescript-vscode = callPackage ./rescript { };
|
||||||
|
|
||||||
cmschuetz12.wal = buildVscodeMarketplaceExtension {
|
cmschuetz12.wal = buildVscodeMarketplaceExtension {
|
||||||
mktplcRef = {
|
mktplcRef = {
|
||||||
name = "wal";
|
name = "wal";
|
||||||
|
|
28
pkgs/misc/vscode-extensions/rescript/default.nix
Normal file
28
pkgs/misc/vscode-extensions/rescript/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ lib, stdenv, vscode-utils, callPackage }:
|
||||||
|
let
|
||||||
|
rescript-editor-analysis = (callPackage ./rescript-editor-analysis.nix { });
|
||||||
|
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";
|
||||||
|
version = "1.1.3";
|
||||||
|
sha256 = "1c1ipxgm0f0a3vlnhr0v85jr5l3rwpjzh9w8nv2jn5vgvpas0b2a";
|
||||||
|
};
|
||||||
|
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 ];
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, stdenv, fetchFromGitHub, bash, ocaml }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "rescript-editor-analysis";
|
||||||
|
version = "1.1.3";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "rescript-lang";
|
||||||
|
repo = "rescript-vscode";
|
||||||
|
rev = "8d0412a72307b220b7f5774e2612760a2d429059";
|
||||||
|
sha256 = "rHQtfuIiEWlSPuZvNpEafsvlXCj2Uv1YRR1IfvKfC2s=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ ocaml ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
cd analysis
|
||||||
|
substituteInPlace Makefile --replace "/bin/bash" "${bash}/bin/bash"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D -m0555 rescript-editor-analysis.exe $out/bin/rescript-editor-analysis.exe
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Analysis binary for the ReScript VSCode plugin";
|
||||||
|
homepage = "https://github.com/rescript-lang/rescript-vscode";
|
||||||
|
maintainers = with maintainers; [ dlip ];
|
||||||
|
license = licenses.mit;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue