emacsPackages.copilot: 0.1.27->0.2.0 (#401943)
This commit is contained in:
+14
-26
@@ -4,48 +4,36 @@
|
|||||||
editorconfig,
|
editorconfig,
|
||||||
f,
|
f,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
replaceVars,
|
jsonrpc,
|
||||||
nodejs,
|
nodejs,
|
||||||
s,
|
s,
|
||||||
melpaBuild,
|
melpaBuild,
|
||||||
copilot-node-server,
|
copilot-language-server,
|
||||||
}:
|
}:
|
||||||
let
|
melpaBuild (finalAttrs: {
|
||||||
# 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";
|
pname = "copilot";
|
||||||
version = "0-unstable-2024-12-28";
|
version = "0.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "copilot-emacs";
|
owner = "copilot-emacs";
|
||||||
repo = "copilot.el";
|
repo = "copilot.el";
|
||||||
rev = "c5dfa99f05878db5e6a6a378dc7ed09f11e803d4";
|
rev = "v${finalAttrs.version}";
|
||||||
sha256 = "sha256-FzI08AW7a7AleEM7kSQ8LsWsDYID8SW1SmSN6/mIB/A=";
|
sha256 = "sha256-hIA+qdWoOJI9/hqBUSHhmh+jjzDnPiZkIzszCPuQxd0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
files = ''(:defaults "dist")'';
|
files = ''(:defaults "dist")'';
|
||||||
|
|
||||||
patches = [
|
postPatch = ''
|
||||||
(replaceVars ./specify-copilot-install-dir.patch {
|
substituteInPlace copilot.el \
|
||||||
copilot-node-server = pinned-copilot-node-server;
|
--replace-fail "defcustom copilot-server-executable \"copilot-language-server\"" \
|
||||||
})
|
"defcustom copilot-server-executable \"${lib.getExe copilot-language-server}\""
|
||||||
];
|
'';
|
||||||
|
|
||||||
packageRequires = [
|
packageRequires = [
|
||||||
dash
|
dash
|
||||||
editorconfig
|
editorconfig
|
||||||
f
|
f
|
||||||
|
jsonrpc
|
||||||
s
|
s
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -64,4 +52,4 @@ melpaBuild {
|
|||||||
"x86_64-windows"
|
"x86_64-windows"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
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
|
|
||||||
Reference in New Issue
Block a user