coc-yaml: migrate from nodePackages
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
coc-vimlsp,
|
||||
coc-vimtex,
|
||||
coc-wxml,
|
||||
coc-yaml,
|
||||
}:
|
||||
final: prev: {
|
||||
coc-basedpyright = buildVimPlugin {
|
||||
@@ -233,4 +234,9 @@ final: prev: {
|
||||
inherit (coc-wxml) pname version meta;
|
||||
src = "${coc-wxml}/lib/node_modules/coc-wxml";
|
||||
};
|
||||
|
||||
coc-yaml = buildVimPlugin {
|
||||
inherit (coc-yaml) pname version meta;
|
||||
src = "${coc-yaml}/lib/node_modules/coc-yaml";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ let
|
||||
"coc-ltex"
|
||||
"coc-tsserver"
|
||||
"coc-ultisnips"
|
||||
"coc-yaml"
|
||||
"coc-yank"
|
||||
"coc-nginx"
|
||||
];
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
diff --git i/package-lock.json w/package-lock.json
|
||||
index 294a466..424d557 100644
|
||||
--- i/package-lock.json
|
||||
+++ w/package-lock.json
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "coc-yaml",
|
||||
- "version": "1.9.0",
|
||||
+ "version": "1.9.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "coc-yaml",
|
||||
- "version": "1.9.0",
|
||||
+ "version": "1.9.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"prettier": "2.0.5"
|
||||
@@ -27,6 +27,8 @@
|
||||
},
|
||||
"node_modules/@chemzqm/tsconfig": {
|
||||
"version": "0.0.3",
|
||||
+ "resolved": "https://registry.npmjs.org/@chemzqm/tsconfig/-/tsconfig-0.0.3.tgz",
|
||||
+ "integrity": "sha512-MjF25vbqLYR+S+JJLgBi0vn4gZqv/C87H+yPSlVKEqlIJAJOGJOgFPUFvRS7pdRHqkv2flX/oRxzxhlu2V0X1w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -464,6 +466,8 @@
|
||||
},
|
||||
"node_modules/ansi-styles": {
|
||||
"version": "6.1.0",
|
||||
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz",
|
||||
+ "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -533,6 +537,8 @@
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "10.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
|
||||
+ "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -546,11 +552,15 @@
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.9",
|
||||
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
|
||||
+ "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==",
|
||||
"dev": true,
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
+ "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
+ "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -562,6 +572,8 @@
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.0.5",
|
||||
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
|
||||
+ "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
@@ -572,6 +584,8 @@
|
||||
},
|
||||
"node_modules/request-light": {
|
||||
"version": "0.5.7",
|
||||
+ "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.5.7.tgz",
|
||||
+ "integrity": "sha512-i/wKzvcx7Er8tZnvqSxWuNO5ZGggu2UgZAqj/RyZ0si7lBTXL7kZiI/dWxzxnQjaY7s5HEy1qK21Do4Ncr6cVw==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
@@ -591,6 +605,8 @@
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
+ "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
+ "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "coc-yaml";
|
||||
version = "1.9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "neoclide";
|
||||
repo = "coc-yaml";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-JzIajdgVOVJupxmHrw9GuGDZS863YaUa5FomT2tqBpc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./package-lock-fix.patch
|
||||
];
|
||||
|
||||
npmDepsHash = "sha256-2XFXeF2ork6cPrYU2avpXSoAvLa7If6AtYtBGoxL/2g=";
|
||||
|
||||
npmBuildScript = "prepare";
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "Yaml language server extension for coc.nvim";
|
||||
homepage = "https://github.com/neoclide/coc-yaml";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ pyrox0 ];
|
||||
};
|
||||
})
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/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/neoclide/coc-yaml/tags" | jq -r '.[] | .name' | sort --version-sort | tail -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/neoclide/coc-yaml" -b "$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 --version="$NEW_VERSION" "$UPDATE_NIX_PNAME"
|
||||
|
||||
# Cleanup
|
||||
rm -rf "$WORKDIR"
|
||||
@@ -115,6 +115,7 @@ mapAliases {
|
||||
inherit (pkgs) coc-vimlsp; # Added 2025-11-05
|
||||
inherit (pkgs) coc-vimtex; # Added 2025-11-05
|
||||
inherit (pkgs) coc-wxml; # Added 2025-11-05
|
||||
inherit (pkgs) coc-yaml; # Added 2025-11-05
|
||||
coinmon = throw "coinmon was removed since it was abandoned upstream"; # added 2024-03-19
|
||||
coffee-script = pkgs.coffeescript; # added 2023-08-18
|
||||
inherit (pkgs) concurrently; # added 2024-08-05
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
, "coc-ltex"
|
||||
, "coc-tsserver"
|
||||
, "coc-ultisnips"
|
||||
, "coc-yaml"
|
||||
, "coc-yank"
|
||||
, "code-theme-converter"
|
||||
, "conventional-changelog-cli"
|
||||
|
||||
-30
@@ -24326,15 +24326,6 @@ let
|
||||
sha512 = "s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ==";
|
||||
};
|
||||
};
|
||||
"prettier-2.0.5" = {
|
||||
name = "prettier";
|
||||
packageName = "prettier";
|
||||
version = "2.0.5";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz";
|
||||
sha512 = "7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==";
|
||||
};
|
||||
};
|
||||
"prettier-2.8.8" = {
|
||||
name = "prettier";
|
||||
packageName = "prettier";
|
||||
@@ -37077,27 +37068,6 @@ in
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
coc-yaml = nodeEnv.buildNodePackage {
|
||||
name = "coc-yaml";
|
||||
packageName = "coc-yaml";
|
||||
version = "1.9.1";
|
||||
src = fetchurl {
|
||||
url = "https://registry.npmjs.org/coc-yaml/-/coc-yaml-1.9.1.tgz";
|
||||
sha512 = "PKDIWjnTF1193m0a5srO8oOLrOv9nKwaqka+a+sdzDjlyPoFipEADFUQVdoHwe1GYlfYe7tmfWOUCbR6ddRLrw==";
|
||||
};
|
||||
dependencies = [
|
||||
sources."prettier-2.0.5"
|
||||
];
|
||||
buildInputs = globalBuildInputs;
|
||||
meta = {
|
||||
description = "yaml extension for coc.nvim";
|
||||
homepage = "https://github.com/neoclide/coc-yaml#readme";
|
||||
license = "MIT";
|
||||
};
|
||||
production = true;
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
};
|
||||
coc-yank = nodeEnv.buildNodePackage {
|
||||
name = "coc-yank";
|
||||
packageName = "coc-yank";
|
||||
|
||||
Reference in New Issue
Block a user