11 inherit (stdenv.hostPlatform) system;
12 throwSystem = throw "Unsupported system: ${system}";
16 x86_64-linux = "linux_x64";
17 aarch64-linux = "linux_arm";
18 x86_64-darwin = "macos_x64";
19 aarch64-darwin = "macos_arm";
22 .${system} or throwSystem;
26 x86_64-linux = "sha256-+u1WLD/EPkbFcpjMhJqAMzsh4DaaykfPUIzH7D0OLS8=";
27 aarch64-linux = "sha256-7gbevNNvvf03oVy1wcnD8b1hj5ccPyyMDfPEZyL6cdM=";
28 x86_64-darwin = "sha256-aQdOaenIv5+7dqRPvChU5UeWwll75/qQXwP7mbZxFXg=";
29 aarch64-darwin = "sha256-xKqKHEc4DSymmZ12dcs1dqhVhyYB97tdUX1pQFyJpuE=";
31 .${system} or throwSystem;
33 bin = "$out/bin/codeium_language_server";
36 stdenv.mkDerivation (finalAttrs: {
40 name = "${finalAttrs.pname}-${finalAttrs.version}.gz";
41 url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz";
45 nativeBuildInputs = [ gzip ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
54 gzip -dc $src > ${bin}
59 nativeInstallCheckInputs = [
62 versionCheckProgram = "${placeholder "out"}/bin/codeium_language_server";
63 versionCheckProgramArg = [ "--version" ];
64 doInstallCheck = true;
66 passthru.updateScript = ./update.sh;
69 description = "Codeium language server";
71 Codeium proprietary language server, patched for Nix(OS) compatibility.
72 bin/language_server_x must be symlinked into the plugin directory, replacing the existing binary.
75 ln -s "$(which codeium_language_server)" /home/a/.local/share/JetBrains/Rider2023.1/codeium/662505c9b23342478d971f66a530cd102ae35df7/language_server_linux_x64
78 homepage = "https://codeium.com/";
79 downloadPage = homepage;
81 license = lib.licenses.unfree;
82 maintainers = with lib.maintainers; [ anpin ];
83 mainProgram = "codeium_language_server";
90 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];