Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 56 lines 1.3 kB view raw
1{ 2 lib, 3 buildNpmPackage, 4 fetchNpmDeps, 5 fetchFromGitHub, 6 versionCheckHook, 7 nix-update-script, 8}: 9 10buildNpmPackage rec { 11 pname = "node-client"; 12 version = "5.3.0"; 13 14 src = fetchFromGitHub { 15 owner = "neovim"; 16 repo = "node-client"; 17 tag = "v${version}"; 18 hash = "sha256-0vPw2hCGUDepSpF1gp/lI71EgwGsCSnw7ePP7ElHsTQ="; 19 }; 20 21 npmDeps = fetchNpmDeps { 22 inherit src; 23 hash = "sha256-VYoJAi1RzVf5ObjuGmnuiA/1WYBWC+qYPdfWF98+oGw="; 24 }; 25 26 buildPhase = '' 27 runHook preBuild 28 npm run build 29 runHook postBuild 30 ''; 31 32 postInstall = '' 33 mkdir $out/bin 34 ln -s $out/lib/node_modules/neovim/node_modules/.bin/neovim-node-host $out/bin/neovim-node-host 35 ''; 36 37 nativeInstallCheckInputs = [ 38 versionCheckHook 39 ]; 40 versionCheckProgram = "${placeholder "out"}/bin/neovim-node-host"; 41 versionCheckProgramArg = "--version"; 42 doInstallCheck = true; 43 44 passthru = { 45 updateScript = nix-update-script { }; 46 }; 47 48 meta = { 49 description = "Nvim msgpack API client and remote plugin provider"; 50 homepage = "https://github.com/neovim/node-client"; 51 changelog = "https://github.com/neovim/node-client/releases/tag/v${version}"; 52 license = lib.licenses.mit; 53 maintainers = with lib.maintainers; [ fidgetingbits ]; 54 mainProgram = "neovim-node-host"; 55 }; 56}