emacsPackages.copilot: bump and fix (#370235)

This commit is contained in:
adisbladis
2025-01-03 15:52:52 +13:00
committed by GitHub
2 changed files with 38 additions and 3 deletions
@@ -4,23 +4,44 @@
editorconfig,
f,
fetchFromGitHub,
replaceVars,
nodejs,
s,
melpaBuild,
copilot-node-server,
}:
let
# The Emacs package isn't compatible with the latest
# copilot-node-server so we have to set a specific revision
# https://github.com/copilot-emacs/copilot.el/issues/344
pinned-copilot-node-server = copilot-node-server.overrideAttrs (old: rec {
version = "1.27.0";
src = fetchFromGitHub {
owner = "jfcherng";
repo = "copilot-node-server";
rev = version;
hash = "sha256-Ds2agoO7LBXI2M1dwvifQyYJ3F9fm9eV2Kmm7WITgyo=";
};
});
in
melpaBuild {
pname = "copilot";
version = "0-unstable-2024-05-01";
version = "0-unstable-2024-12-28";
src = fetchFromGitHub {
owner = "copilot-emacs";
repo = "copilot.el";
rev = "733bff26450255e092c10873580e9abfed8a81b8";
sha256 = "sha256-Knp36PtgA73gtYO+W1clQfr570bKCxTFsGW3/iH86A0=";
rev = "c5dfa99f05878db5e6a6a378dc7ed09f11e803d4";
sha256 = "sha256-FzI08AW7a7AleEM7kSQ8LsWsDYID8SW1SmSN6/mIB/A=";
};
files = ''(:defaults "dist")'';
patches = [
(replaceVars ./specify-copilot-install-dir.patch {
copilot-node-server = pinned-copilot-node-server;
})
];
packageRequires = [
dash
editorconfig
@@ -0,0 +1,14 @@
diff --git a/copilot.el b/copilot.el
index f1f5e51..ddf2b5b 100644
--- a/copilot.el
+++ b/copilot.el
@@ -132,8 +132,7 @@ (defcustom copilot-indentation-alist
(defconst copilot-server-package-name "copilot-node-server"
"The name of the package to install copilot server.")
-(defcustom copilot-install-dir (expand-file-name
- (locate-user-emacs-file (f-join ".cache" "copilot")))
+(defcustom copilot-install-dir "@copilot-node-server@"
"Directory in which the servers will be installed."
:risky t
:type 'directory