Unverified Commit da40187b authored by superherointj's avatar superherointj Committed by GitHub
Browse files

Merge pull request #181996 from jayeshbhoot/rescript-vscode-1.4.0

vscode-extensions.chenglou92.rescript-vscode: 1.3.0 -> 1.6.0
parents dcc7610b cc5159e5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
{ lib, stdenv, vscode-utils, callPackage }:
let
  rescript-editor-analysis = (callPackage ./rescript-editor-analysis.nix { });
  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"
@@ -11,8 +12,8 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
  mktplcRef = {
    name = "rescript-vscode";
    publisher = "chenglou92";
    version = "1.3.0";
    sha256 = "sha256-Sgi7FFOpI/XOeyPOrDhwZdZ+43ilUz7oQ49yB7tiMXk=";
    inherit version;
    sha256 = "sha256-/Nv+uyTkJQVaPKIDRr1P/Z5vsituXpP48/sDn3FUEeA=";
  };
  postPatch = ''
    rm -r ${analysisDir}
@@ -22,7 +23,7 @@ vscode-utils.buildVscodeMarketplaceExtension rec {
  meta = with lib; {
    description = "The official VSCode plugin for ReScript";
    homepage = "https://github.com/rescript-lang/rescript-vscode";
    maintainers = with maintainers; [ dlip ];
    maintainers = with maintainers; [ dlip jayesh-bhoot ];
    license = licenses.mit;
  };
}
+10 −7
Original line number Diff line number Diff line
{ lib, stdenv, fetchFromGitHub, bash, ocaml }:
{ lib, stdenv, fetchFromGitHub, bash, ocaml, dune_3, version }:

stdenv.mkDerivation {
  pname = "rescript-editor-analysis";
  version = "1.1.3";
  inherit version;

  src = fetchFromGitHub {
    owner = "rescript-lang";
    repo = "rescript-vscode";
    rev = "8d0412a72307b220b7f5774e2612760a2d429059";
    sha256 = "rHQtfuIiEWlSPuZvNpEafsvlXCj2Uv1YRR1IfvKfC2s=";
    rev = version;
    sha256 = "sha256-O5kZCnhtMcevPTs5UxhIXx124WQf1VvF2WMVHjMEQZc=";
  };

  nativeBuildInputs = [ ocaml ];
  nativeBuildInputs = [ ocaml dune_3 ];

  # Skip testing phases because they need to download and install node modules
  postPatch = ''
    cd analysis
    substituteInPlace Makefile --replace "/bin/bash" "${bash}/bin/bash"
    substituteInPlace Makefile \
      --replace "build: build-analysis-binary build-reanalyze build-tests" "build: build-analysis-binary" \
      --replace "test: test-analysis-binary test-reanalyze" "test: test-analysis-binary"
  '';

  installPhase = ''
@@ -25,7 +28,7 @@ stdenv.mkDerivation {
  meta = with lib; {
    description = "Analysis binary for the ReScript VSCode plugin";
    homepage = "https://github.com/rescript-lang/rescript-vscode";
    maintainers = with maintainers; [ dlip ];
    maintainers = with maintainers; [ dlip jayesh-bhoot ];
    license = licenses.mit;
  };
}