emacsPackages.codeium: refactor with melpaBuild

This commit is contained in:
running-grass 2024-01-05 19:16:40 +08:00
parent 1be0f6fd4d
commit bfb4abb9eb
No known key found for this signature in database
GPG Key ID: A4096082BF6552F2

View File

@ -1,5 +1,6 @@
{ trivialBuild, fetchFromGitHub, pkgs, lib, }:
trivialBuild {
{ fetchFromGitHub, melpaBuild, pkgs, lib, substituteAll, writeText }:
melpaBuild {
pname = "codeium";
version = "1.6.13";
src = fetchFromGitHub {
@ -8,14 +9,22 @@ trivialBuild {
rev = "1.6.13";
hash = "sha256-CjT21GhryO8/iM0Uzm/s/I32WqVo4M3tSlHC06iEDXA=";
};
commit = "02f9382c925633a19dc928e99b868fd5f6947e58";
buildInputs = [ pkgs.codeium ];
patches = [ ./codeium.el.patch ];
postPatch = ''
substituteInPlace codeium.el --subst-var-by codeium ${pkgs.codeium}/bin/codeium_language_server
recipe = writeText "recipe" ''
(codeium
:repo "Exafunction/codeium.el"
:fetcher github)
'';
patches = [
(substituteAll {
src = ./codeium.el.patch;
codeium = "${pkgs.codeium}/bin/codeium_language_server";
})
];
meta = {
description = "Free, ultrafast Copilot alternative for Emacs";
homepage = "https://github.com/Exafunction/codeium.el";