Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emacsPackages.codeium: init at 1.6.13 #278201

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ in

cask = callPackage ./manual-packages/cask { };

codeium = callPackage ./manual-packages/codeium { };

consult-gh = callPackage ./manual-packages/consult-gh { };

control-lock = callPackage ./manual-packages/control-lock { };
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/codeium.el b/codeium.el
index 669333e..4d5012d 100644
--- a/codeium.el
+++ b/codeium.el
@@ -353,12 +353,7 @@ If you set `codeium-port', it will be used instead and no process will be create
(pending-table (make-hash-table :test 'eql :weakness nil)) ; requestid that we are waiting for
)

-(codeium-def codeium-command-executable
- (expand-file-name
- (pcase system-type
- ('windows-nt "codeium_language_server.exe")
- (_ "codeium_language_server"))
- (expand-file-name "codeium" user-emacs-directory)))
+(codeium-def codeium-command-executable "@codeium@")

(codeium-def codeium-enterprise nil)
(codeium-def codeium-portal-url "https://www.codeium.com")
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ trivialBuild, fetchFromGitHub, pkgs, lib, }:
trivialBuild {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use melpBuild or elpaBuild.

Packages built by trivialBuild will not be activated[1][2] by Emacs's builtin package manager package.el when Emacs starts. So some issues occur:

  • autoloaded commands does not work out-of-the-box: you have to call (require 'foo-autoloads) first before calling an autoloaded command
  • info manual does not show in C-h i

Maybe this issue of trivialBuild should be documented somewhere? @adisbladis @AndersonTorres

[1]: its package dir is not searched by Emacs
[2]: it does not contain a foo-pkg.el file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved it with #278918

Copy link
Member

@AndersonTorres AndersonTorres Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jian-lin here is:
#278925

Feel free to stack issues and use it to track down them

pname = "codeium";
version = "1.6.13";
src = fetchFromGitHub {
owner = "Exafunction";
repo = "codeium.el";
rev = "1.6.13";
hash = "sha256-CjT21GhryO8/iM0Uzm/s/I32WqVo4M3tSlHC06iEDXA=";
};

buildInputs = [ pkgs.codeium ];
adisbladis marked this conversation as resolved.
Show resolved Hide resolved

patches = [ ./codeium.el.patch ];
postPatch = ''
substituteInPlace codeium.el --subst-var-by codeium ${pkgs.codeium}/bin/codeium_language_server
'';

meta = {
description = "Free, ultrafast Copilot alternative for Emacs";
homepage = "https://github.com/Exafunction/codeium.el";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.running-grass ];
platforms = pkgs.codeium.meta.platforms;
adisbladis marked this conversation as resolved.
Show resolved Hide resolved
sourceProvenance = [ lib.sourceTypes.fromSource ];
};

}