1 { stdenv, lib, fetchurl, gzip, autoPatchelfHook }:
4 inherit (stdenv.hostPlatform) system;
5 throwSystem = throw "Unsupported system: ${system}";
8 x86_64-linux = "linux_x64";
9 aarch64-linux = "linux_arm";
10 x86_64-darwin = "macos_x64";
11 aarch64-darwin = "macos_arm";
13 }.${system} or throwSystem;
16 x86_64-linux = "sha256-CQQ2GFy8eEaZkbnuCvBgSRMlwrEfqvM+dF1jlr6b7hk=";
17 aarch64-linux = "sha256-LGGZZmVVO1ZhKXfU1F9SC2pGEZOqbf/hxmBMex4ll1o=";
18 x86_64-darwin = "sha256-+pReEaZyi3o/ftaglOUNHoal9PShfj0gSJ2B3cg2Pa0=";
19 aarch64-darwin = "sha256-0l6YlL9CSypRCzbxTOpC9fx2blgu5uelYCo85koJUdA=";
20 }.${system} or throwSystem;
22 bin = "$out/bin/codeium_language_server";
25 stdenv.mkDerivation (finalAttrs: {
29 name = "${finalAttrs.pname}-${finalAttrs.version}.gz";
30 url = "https://github.com/Exafunction/codeium/releases/download/language-server-v${finalAttrs.version}/language_server_${plat}.gz";
34 nativeBuildInputs = [ gzip ] ++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
43 gzip -dc $src > ${bin}
48 passthru.updateScript = ./update.sh;
51 description = "Codeium language server";
53 Codeium proprietary language server, patched for Nix(OS) compatibility.
54 bin/language_server_x must be symlinked into the plugin directory, replacing the existing binary.
57 ln -s "$(which codeium_language_server)" /home/a/.local/share/JetBrains/Rider2023.1/codeium/662505c9b23342478d971f66a530cd102ae35df7/language_server_linux_x64
60 homepage = "https://codeium.com/";
61 downloadPage = homepage;
63 license = lib.licenses.unfree;
64 maintainers = with lib.maintainers; [ anpin ];
65 mainProgram = "codeium";
66 platforms = [ "aarch64-darwin" "aarch64-linux" "x86_64-linux" "x86_64-darwin" ];
67 sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];