kilocode-cli: drop package, recommend kilo

Follow upstream package naming and drop `-cli` package that's on old
`cli-v` tags only. Add a backwards compatible symlink.
This commit is contained in:
Austin Horstman
2026-04-30 14:35:28 -05:00
parent cbbbe5d41a
commit 273cbef2d9
3 changed files with 2 additions and 136 deletions
+1
View File
@@ -122,6 +122,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
runHook preInstall
install -Dm755 dist/@kilocode/cli-*/bin/kilo $out/bin/kilo
ln -s kilo $out/bin/kilocode
wrapProgram $out/bin/kilo \
--prefix PATH : ${
-136
View File
@@ -1,136 +0,0 @@
{
lib,
stdenv,
stdenvNoCC,
fetchFromGitHub,
fetchPnpmDeps,
fetchNpmDeps,
nodejs,
writableTmpDirAsHomeHook,
pnpmConfigHook,
pnpm_10,
unzip,
patchelf,
autoPatchelfHook,
ripgrep,
versionCheckHook,
nix-update-script,
}:
let
pnpm = pnpm_10;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "kilocode-cli";
version = "0.25.1";
src = fetchFromGitHub {
owner = "Kilo-Org";
repo = "kilocode-legacy";
tag = "cli-v${finalAttrs.version}";
hash = "sha256-XlJ9/9FABLpKVJXdIRzbzOpJVXdIzgFvPPeER1LRsuk=";
};
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-Q/LamZwVaIQVILtXRi1RQrYtpxYJWEKPAt3knwm47S0=";
};
npmDeps = fetchNpmDeps {
name = "${finalAttrs.pname}-npm-deps";
inherit (finalAttrs) src;
sourceRoot = "${finalAttrs.src.name}/cli";
postPatch = ''
cp ./npm-shrinkwrap.dist.json ./npm-shrinkwrap.json
'';
hash = "sha256-wH4Gyd5nv8sCSQStFqIidoICvlXXEs2xNNX+DH133wA=";
};
buildInputs = [
nodejs
];
nativeBuildInputs = [
writableTmpDirAsHomeHook
pnpmConfigHook
pnpm
nodejs
unzip
patchelf
]
++ lib.optionals stdenv.hostPlatform.isElf [ autoPatchelfHook ];
strictDeps = true;
env.npm_config_manage_package_manager_versions = "false";
buildPhase = ''
runHook preBuild
mkdir -p ./cli/.dist/
find ./cli -maxdepth 1 -type f -name "*.dist.*" -print0 | while IFS= read -r -d "" file; do
cp "$file" "./cli/.dist/$(basename "$file" | sed 's/\.dist\././')"
done
if ! diff "$PWD/cli/npm-shrinkwrap.dist.json" "$npmDeps/package-lock.json"; then
echo "npm-shrinkwrap.json is out of date"
echo "The npm-shrinkwrap.json in src is not the same as the in $npmDeps."
echo "To fix the issue:"
echo '1. Use `lib.fakeHash` as the npmDepsHash value'
echo "2. Build the derivation and wait for it to fail with a hash mismatch"
echo "3. Copy the 'got: sha256-' value back into the npmDepsHash field"
exit 1
fi
export npm_config_cache="$npmDeps"
export npm_config_offline="true"
export npm_config_progress="false"
(
cd ./cli/.dist
npm ci --omit=dev --ignore-scripts
patchShebangs node_modules
if [ -d node_modules/@vscode/ripgrep ]; then
mkdir -p node_modules/@vscode/ripgrep/bin
ln -s ${lib.getExe ripgrep} node_modules/@vscode/ripgrep/bin/rg
fi
npm rebuild
)
substituteInPlace cli/package.json \
--replace-fail 'npm install --omit=dev --prefix ./dist' 'mv ./.dist/node_modules ./dist/node_modules'
node --run cli:bundle
touch ./cli/dist/.env
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin/ $out/lib/node_modules/@kilocode/
mv ./cli/dist $out/lib/node_modules/@kilocode/cli
ln -s $out/lib/node_modules/@kilocode/cli/index.js $out/bin/kilocode
chmod +x $out/bin/kilocode
runHook postInstall
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "--version";
passthru = {
updateScript = nix-update-script { extraArgs = [ "--version-regex=^cli-v(.+)$" ]; };
};
meta = {
description = "Terminal User Interface for Kilo Code";
homepage = "https://kilocode.ai/cli";
downloadPage = "https://www.npmjs.com/package/@kilocode/cli";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
xiaoxiangmoe
];
mainProgram = "kilocode";
};
})
+1
View File
@@ -1071,6 +1071,7 @@ mapAliases {
kgx = throw "'kgx' has been renamed to/replaced by 'gnome-console'"; # Converted to throw 2025-10-27
khd = throw "'khd' has been removed as it has been pulled upstream"; # Added 2025-12-18
khoj = throw "khoj has been removed because it has been marked as broken since at least November 2024."; # Added 2025-10-11
kilocode-cli = warnAlias "'kilocode-cli' has been renamed to/replaced by 'kilo'" kilo; # Added 2026-04-30
kio-fuse = throw "'kio-fuse' has been removed, as Plasma 5 has reached end of life. Use 'kdePackages.kio-fuse' for Plasma 6."; # Added 2026-05-01
kmplayer = throw "'kmplayer' has been removed, as it is unmaintained upstream"; # Added 2025-08-30
knot-resolver = warnAlias "'knot-resolver' is currently aliased to 'knot-resolver_5'. This will change with the knot-resolver 6 being declared as stable. Please explicitly use the 'knot-resolver_5' or 'knot-resolver_6' package until then." knot-resolver_5; # Added 2025-11-30