Commit 66db139e authored by Doron Behar's avatar Doron Behar
Browse files
parent 2e6c0a7f
Loading
Loading
Loading
Loading
+4 −28
Original line number Diff line number Diff line
{
  lib,
  python311,
  python3,
  fetchFromGitHub,
  fetchpatch,
}:

let
  python3 = python311.override {
    self = python3;
    packageOverrides = _: super: {
      tree-sitter = super.tree-sitter_0_21;
      lsp-tree-sitter = super.lsp-tree-sitter.overridePythonAttrs (__: {
        pythonRelaxDeps = [ "tree-sitter" ];
      });
    };
  };
in
python3.pkgs.buildPythonApplication rec {
  pname = "autotools-language-server";
  version = "0.0.19";
  version = "0.0.22";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "Freed-Wu";
    repo = "autotools-language-server";
    tag = version;
    hash = "sha256-V0EOV1ZmeC+4svc2fqV6AIiL37dkrxUJAnjywMZcENw=";
    hash = "sha256-PvaEcdvUE8QpxKuW65RL8SgDl/RM/C3HTEK3v+YA73c=";
  };
  patches = [
    # Right before the release, upstream decided to replace the
    # tree-sitter-languages dependency with tree-sitter-make, which is yanked
    # from some reason. Hopefully upstream will fix this dependency a bit
    # better in the next release. See also:
    # https://github.com/Freed-Wu/autotools-language-server/commit/f149843becfcfd6b2bb4a98eb1f3984c01d5fd33#r142659163
    (fetchpatch {
      url = "https://github.com/Freed-Wu/autotools-language-server/commit/f149843becfcfd6b2bb4a98eb1f3984c01d5fd33.patch";
      hash = "sha256-TrzHbfR6GYAEqDIFiCqSX2+Qv4JeFJ5faiKJhNYojf0=";
      revert = true;
    })
  ];

  build-system = [
    python3.pkgs.setuptools-generate
@@ -46,7 +22,7 @@ python3.pkgs.buildPythonApplication rec {
  ];

  dependencies = with python3.pkgs; [
    tree-sitter-languages
    tree-sitter-make
    lsp-tree-sitter
  ];
  nativeCheckInputs = [