okapi-ed: init at 0.4.1

This commit is contained in:
Philipp Riederer
2026-04-14 21:58:12 +02:00
parent 8e302268cc
commit 24db1431ef
+42
View File
@@ -0,0 +1,42 @@
{
lib,
fetchFromGitHub,
makeBinaryWrapper,
ripgrep,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
__structuredAttrs = true;
pname = "okapi-ed";
version = "0.4.1";
src = fetchFromGitHub {
owner = "nk9";
repo = "okapi";
tag = "v${finalAttrs.version}";
hash = "sha256-Xnckb3CMB8lE1oaEbmy8etRGJB5BuSoHts0phXm48uM=";
};
cargoHash = "sha256-g+JbSph5Fplq7SYKnWUpMQdoT989+qOe+kRUK3K+bDk=";
nativeBuildInputs = [ makeBinaryWrapper ];
postFixup = ''
wrapProgram "$out/bin/okapi" \
--prefix PATH : "${lib.makeBinPath [ ripgrep ]}"
'';
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
meta = {
description = "Find lines across files by regex and edit them all at once with your $EDITOR";
homepage = "https://github.com/nk9/okapi";
license = lib.licenses.asl20;
mainProgram = "okapi";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ toelke ];
};
})