-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copilot-node-server: init at 1.41.0 (#348771)
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
lib, | ||
buildNpmPackage, | ||
fetchFromGitHub, | ||
}: | ||
|
||
buildNpmPackage rec { | ||
pname = "copilot-node-server"; | ||
version = "1.41.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "jfcherng"; | ||
repo = "copilot-node-server"; | ||
rev = "v${version}"; | ||
hash = "sha256-yOqA2Xo4c7u0g6RQYt9joQk8mI9KE0xTAnLjln9atmg="; | ||
}; | ||
|
||
npmDepsHash = "sha256-tbcNRQBbJjN1N5ENxCvPQbfteyxTbPpi35dYmeUc4A4="; | ||
|
||
postPatch = '' | ||
# Upstream doesn't provide any lock file so we provide our own: | ||
cp ${./package-lock.json} package-lock.json | ||
''; | ||
|
||
preInstall = '' | ||
# `npmInstallHook` requires a `node_modules/` folder but `npm | ||
# install` doesn't generate one because the project has no | ||
# dependencies: | ||
mkdir node_modules/ | ||
''; | ||
|
||
forceEmptyCache = true; | ||
dontNpmBuild = true; | ||
|
||
meta = with lib; { | ||
description = "Copilot Node.js server"; | ||
homepage = src.meta.homepage; | ||
license = licenses.unfree; # I don't know: https://github.com/jfcherng/copilot-node-server/blob/main/LICENSE.md | ||
maintainers = with maintainers; [ DamienCassou ]; | ||
mainProgram = "copilot-node-server"; | ||
}; | ||
} |