1{
2 lib,
3 buildNpmPackage,
4 fetchzip,
5 nix-update-script,
6}:
7
8buildNpmPackage (finalAttrs: {
9 pname = "github-copilot-cli";
10 version = "0.0.328";
11
12 src = fetchzip {
13 url = "https://registry.npmjs.org/@github/copilot/-/copilot-${finalAttrs.version}.tgz";
14 hash = "sha256-9oTaVjvwyS8KY8N5kUEiAs+l6vEd/BZ0AGJI0p9Jie0=";
15 };
16
17 npmDepsHash = "sha256-WK6t3IW4uF+MDu7Y5GRinbm8iDcYB8RhJ15GE9VBcjQ=";
18
19 postPatch = ''
20 cp ${./package-lock.json} package-lock.json
21 '';
22
23 dontNpmBuild = true;
24
25 passthru.updateScript = nix-update-script { extraArgs = [ "--generate-lockfile" ]; };
26
27 meta = {
28 description = "GitHub Copilot CLI brings the power of Copilot coding agent directly to your terminal";
29 homepage = "https://github.com/github/copilot-cli";
30 changelog = "https://github.com/github/copilot-cli/releases/tag/v${finalAttrs.version}";
31 downloadPage = "https://www.npmjs.com/package/@github/copilot";
32 license = lib.licenses.unfree;
33 maintainers = with lib.maintainers; [
34 dbreyfogle
35 ];
36 mainProgram = "copilot";
37 };
38})