Skip to content

Commit 97e6d41

Browse files
authored
emacsPackages.copilot: 0.1.27->0.2.0 (#401943)
2 parents 394cd23 + 75a259a commit 97e6d41

File tree

2 files changed

+14
-40
lines changed

2 files changed

+14
-40
lines changed

pkgs/applications/editors/emacs/elisp-packages/manual-packages/copilot/package.nix

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,36 @@
44
editorconfig,
55
f,
66
fetchFromGitHub,
7-
replaceVars,
7+
jsonrpc,
88
nodejs,
99
s,
1010
melpaBuild,
11-
copilot-node-server,
11+
copilot-language-server,
1212
}:
13-
let
14-
# The Emacs package isn't compatible with the latest
15-
# copilot-node-server so we have to set a specific revision
16-
# https://github.com/copilot-emacs/copilot.el/issues/344
17-
pinned-copilot-node-server = copilot-node-server.overrideAttrs (old: rec {
18-
version = "1.27.0";
19-
src = fetchFromGitHub {
20-
owner = "jfcherng";
21-
repo = "copilot-node-server";
22-
rev = version;
23-
hash = "sha256-Ds2agoO7LBXI2M1dwvifQyYJ3F9fm9eV2Kmm7WITgyo=";
24-
};
25-
});
26-
in
27-
melpaBuild {
13+
melpaBuild (finalAttrs: {
2814
pname = "copilot";
29-
version = "0-unstable-2024-12-28";
15+
version = "0.2.0";
3016

3117
src = fetchFromGitHub {
3218
owner = "copilot-emacs";
3319
repo = "copilot.el";
34-
rev = "c5dfa99f05878db5e6a6a378dc7ed09f11e803d4";
35-
sha256 = "sha256-FzI08AW7a7AleEM7kSQ8LsWsDYID8SW1SmSN6/mIB/A=";
20+
rev = "v${finalAttrs.version}";
21+
sha256 = "sha256-hIA+qdWoOJI9/hqBUSHhmh+jjzDnPiZkIzszCPuQxd0=";
3622
};
3723

3824
files = ''(:defaults "dist")'';
3925

40-
patches = [
41-
(replaceVars ./specify-copilot-install-dir.patch {
42-
copilot-node-server = pinned-copilot-node-server;
43-
})
44-
];
26+
postPatch = ''
27+
substituteInPlace copilot.el \
28+
--replace-fail "defcustom copilot-server-executable \"copilot-language-server\"" \
29+
"defcustom copilot-server-executable \"${lib.getExe copilot-language-server}\""
30+
'';
31+
4532
packageRequires = [
4633
dash
4734
editorconfig
4835
f
36+
jsonrpc
4937
s
5038
];
5139

@@ -64,4 +52,4 @@ melpaBuild {
6452
"x86_64-windows"
6553
];
6654
};
67-
}
55+
})

pkgs/applications/editors/emacs/elisp-packages/manual-packages/copilot/specify-copilot-install-dir.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)