coc-nginx: migrate from nodePackages

This commit is contained in:
dish
2025-11-09 13:56:08 -05:00
parent 983751956f
commit 42ec1c0589
6 changed files with 81 additions and 28 deletions
@@ -2,6 +2,7 @@
lib,
buildVimPlugin,
pkgs,
coc-nginx,
}:
final: prev:
let
@@ -60,3 +61,9 @@ lib.genAttrs cocPackages (
src = "${cocPkg}/lib/node_modules/${cocPkg.pname}";
}
)
// {
coc-nginx = buildVimPlugin {
inherit (coc-nginx) pname version meta;
src = "${coc-nginx}/lib/node_modules/@yaegassy/coc-nginx";
};
}
@@ -10,20 +10,13 @@ let
"coc-ltex"
"coc-tsserver"
"coc-ultisnips"
"coc-nginx"
];
packageNameOverrides = {
"coc-nginx" = "@yaegassy/coc-nginx";
};
getPackageName = name: packageNameOverrides.${name} or name;
in
lib.genAttrs nodePackageNames (
name:
buildVimPlugin {
pname = name;
inherit (nodePackages.${getPackageName name}) version meta;
src = "${nodePackages.${getPackageName name}}/lib/node_modules/${getPackageName name}";
inherit (nodePackages.${name}) version meta;
src = "${nodePackages.${name}}/lib/node_modules/${name}";
}
)
+71
View File
@@ -0,0 +1,71 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
nix-update-script,
esbuild,
buildGoModule,
}:
let
esbuild' =
let
version = "0.16.17";
in
esbuild.override {
buildGoModule =
args:
buildGoModule (
args
// {
inherit version;
src = fetchFromGitHub {
owner = "evanw";
repo = "esbuild";
rev = "v${version}";
hash = "sha256-8L8h0FaexNsb3Mj6/ohA37nYLFogo5wXkAhGztGUUsQ=";
};
vendorHash = "sha256-+BfxCyg0KkDQpHt/wycy/8CTG6YBA/VJvJFhhzUnSiQ=";
}
);
};
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "coc-nginx";
version = "0.5.0";
src = fetchFromGitHub {
owner = "yaegassy";
repo = "coc-nginx";
tag = "v${finalAttrs.version}";
hash = "sha256-9dca1YUQZCbzmGe+9qVJABCWZCGUUZDvtznMQEP/CCQ=";
};
yarnOfflineCache = fetchYarnDeps {
inherit (finalAttrs) src;
hash = "sha256-CBw2E93EWmBOCppj1gxYuAynHBZDJBPh58X099TP5mE=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
nodejs
esbuild'
];
env.ESBUILD_BINARY_PATH = lib.getExe esbuild';
passthru.updateScript = nix-update-script { };
meta = {
description = "nginx-language-server extension for coc.nvim";
homepage = "https://github.com/yaegassy/coc-nginx";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
};
})
@@ -66,6 +66,7 @@ mapAliases {
"@webassemblyjs/wasm-text-gen-1.11.1" = pkgs.wasm-text-gen; # Added 2025-11-06
"@webassemblyjs/wast-refmt-1.11.1" = pkgs.wast-refmt; # Added 2025-11-06
"@withgraphite/graphite-cli" = pkgs.graphite-cli; # added 2024-01-25
"@yaegassy/coc-nginx" = pkgs.coc-nginx; # Added 2025-11-08
"@zwave-js/server" = pkgs.zwave-js-server; # Added 2023-09-09
inherit (pkgs) autoprefixer; # added 2024-06-25
inherit (pkgs) asar; # added 2023-08-26
@@ -76,5 +76,4 @@
, "vega-cli"
, "vercel"
, "wavedrom-cli"
, "@yaegassy/coc-nginx"
]
-18
View File
@@ -40129,22 +40129,4 @@ in
bypassCache = true;
reconstructLock = true;
};
"@yaegassy/coc-nginx" = nodeEnv.buildNodePackage {
name = "_at_yaegassy_slash_coc-nginx";
packageName = "@yaegassy/coc-nginx";
version = "0.4.1";
src = fetchurl {
url = "https://registry.npmjs.org/@yaegassy/coc-nginx/-/coc-nginx-0.4.1.tgz";
sha512 = "GJeiQWiBDxKsWPowBLBjxnPzaRT50L9tLDtD9dZcKh8OQTdrOJGa7cqNz7T/xuqSq3r+AyD1mmeNSL7141HMsQ==";
};
buildInputs = globalBuildInputs;
meta = {
description = "nginx-language-server extension for coc.nvim";
homepage = "https://github.com/yaegassy/coc-nginx#readme";
license = "MIT";
};
production = true;
bypassCache = true;
reconstructLock = true;
};
}