Unverified Commit 9b051d6a authored by Austin Horstman's avatar Austin Horstman
Browse files

coc-sumneko-lua: drop package



Broken package unmaintained for 2 years. Functionality is deprecated and
user's can use an alternative.

Signed-off-by: default avatarAustin Horstman <khaneliman12@gmail.com>
parent f0158241
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ mapAliases (
    caw = caw-vim;
    chad = chadtree;
    coc-rls = throw "coc-rls has been removed, as rls has been archived since 2022. You should use coc-rust-analyzer instead, as rust-analyzer is maintained."; # added 2025-10-01
    coc-sumneko-lua = throw "coc-sumneko-lua was removed, as it is unmaintained and broken. You should switch to lua_ls"; # added 2026-02-04
    coc-vetur = throw "coc-vetur was removed, as vetur is unmaintained by Vue. You should switch to Volar, which supports Vue 3"; # added 2025-10-01
    coffee-script = vim-coffee-script;
    coffeeScript = vim-coffee-script; # backwards compat, added 2014-10-18
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ let
    "coc-spell-checker"
    "coc-sqlfluff"
    "coc-stylelint"
    "coc-sumneko-lua"
    "coc-tabnine"
    "coc-texlab"
    "coc-toml"
+0 −1000

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −60
Original line number Diff line number Diff line
{
  lib,
  buildNpmPackage,
  fetchFromGitHub,
  esbuild,
  buildGoModule,
}:
let
  esbuild' =
    let
      version = "0.20.2";
    in
    esbuild.override {
      buildGoModule =
        args:
        buildGoModule (
          args
          // {
            inherit version;
            src = fetchFromGitHub {
              owner = "evanw";
              repo = "esbuild";
              rev = "v${version}";
              hash = "sha256-h/Vqwax4B4nehRP9TaYbdixAZdb1hx373dNxNHvDrtY=";
            };
            vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
          }
        );
    };
in
buildNpmPackage (finalAttrs: {
  pname = "coc-sumneko-lua";
  version = "0.0.42";

  src = fetchFromGitHub {
    owner = "xiyaowong";
    repo = "coc-sumneko-lua";
    tag = "v${finalAttrs.version}";
    hash = "sha256-B5XvhhBbVeBQI6nWVskaopx2pJYFBiFCfbPwwwloFig=";
  };

  patches = [
    ./package-lock-fix.patch
  ];

  npmDepsHash = "sha256-NEUDQm4hzhGJyEdiBBrSWa8fMw3DcnnPJJo0m+HgZ5U=";

  nativeBuildInputs = [ esbuild' ];

  env.ESBUILD_BINARY_PATH = lib.getExe esbuild';

  passthru.updateScript = ./update.sh;

  meta = {
    description = "Lua extension using sumneko lua-language-server for coc.nvim";
    homepage = "https://github.com/xiyaowong/coc-sumneko-lua";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ pyrox0 ];
  };
})
+0 −31
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nodejs nix-update git curl jq

WORKDIR=$(mktemp -d)
PACKAGE_DIR="$(realpath "$(dirname "$0")")"

# Get latest tag
NEW_VERSION=$(curl "https://api.github.com/repos/xiyaowong/coc-sumneko-lua/tags" | jq -r '.[] | .name' | sort --version-sort | tail -1)
# Trim leading "v" for version comparisons
NEW_VERSION=${NEW_VERSION:1}

# exit early if no change
if [[ "$UPDATE_NIX_OLD_VERSION" == "$NEW_VERSION" ]]; then
  echo "package is up-to-date: $UPDATE_NIX_OLD_VERSION"
  exit 0
fi

# Clone source
git clone "https://github.com/xiyaowong/coc-sumneko-lua" -b "v$NEW_VERSION" "$WORKDIR/src"
pushd "$WORKDIR/src"
npx --yes npm-package-lock-add-resolved

# Update package-lock patch
git diff >"$PACKAGE_DIR/package-lock-fix.patch"
popd

# Run nix-update
nix-update "$UPDATE_NIX_PNAME"

# Cleanup
rm -rf "$WORKDIR"
Loading