mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
63 lines
1.2 KiB
Nix
63 lines
1.2 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitHub,
|
|
makeWrapper,
|
|
pkg-config,
|
|
sqlite,
|
|
gitMinimal,
|
|
writableTmpDirAsHomeHook,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "rtk";
|
|
version = "0.43.0";
|
|
__structuredAttrs = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rtk-ai";
|
|
repo = "rtk";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-n5bkPPsrdM4fE5ltocTjlq+JwRgp39yib6S79fci4m4=";
|
|
};
|
|
|
|
cargoHash = "sha256-XKUKdhxfnwUCOx9slqx4oUFa09HcosPLVh5Xkh87oSk=";
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
sqlite
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/rtk \
|
|
--prefix PATH : ${
|
|
lib.makeBinPath [
|
|
gitMinimal
|
|
]
|
|
}
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
gitMinimal
|
|
writableTmpDirAsHomeHook
|
|
];
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
|
|
meta = {
|
|
description = "CLI proxy that reduces LLM token consumption by 60-90% on common dev commands";
|
|
homepage = "https://github.com/rtk-ai/rtk";
|
|
changelog = "https://github.com/rtk-ai/rtk/blob/${finalAttrs.src.tag}/CHANGELOG.md";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ GaetanLepage ];
|
|
mainProgram = "rtk";
|
|
};
|
|
})
|