Pārlūkot izejas kodu

nixpkgs/neovim: fix node-lsp install

The nixpkgs install step uses npm pack which does not include the `.bin`
folder for dependencies so we use our own install script instead.
Thomas Dy 2 gadi atpakaļ
vecāks
revīzija
df35150fb4

+ 9 - 0
.config/nixpkgs/neovim/node-lsp/default.nix

@@ -8,5 +8,14 @@ buildNpmPackage {
 
   dontNpmBuild = true;
 
+  installPhase = ''
+    mkdir -p "$out/lib"
+    cp -r node_modules "$out/lib"
+
+    mkdir -p "$out/bin"
+    ln -s "$out/lib/node_modules/.bin/typescript-language-server" "$out/bin"
+    ln -s "$out/lib/node_modules/.bin/vscode-eslint-language-server" "$out/bin"
+  '';
+
   npmDepsHash = "sha256-LHNBlnUgO9oj0wnZLjOobUyeepX9JvYAnY8WbV9NAn0=";
 }

+ 0 - 4
.config/nixpkgs/neovim/node-lsp/package.json

@@ -5,9 +5,5 @@
     "vscode-langservers-extracted": "^4.5.0",
     "typescript": "^4.9.5",
     "typescript-language-server": "^3.0.2"
-  },
-  "bin": {
-    "typescript-language-server": "./node_modules/.bin/typescript-language-server",
-    "vscode-eslint-language-server": "./node_modules/.bin/vscode-eslint-language-server"
   }
 }