diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c7dd63044d57..72533be6c4e3 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -27670,6 +27670,12 @@ githubId = 74688871; name = "Tochukwu Ahanonu"; }; + toelke = { + name = "Philipp Riederer"; + email = "philipp@riederer.email"; + github = "toelke"; + githubId = 183276; + }; tom94 = { email = "nix@94.me"; github = "Tom94"; diff --git a/pkgs/by-name/ok/okapi-ed/package.nix b/pkgs/by-name/ok/okapi-ed/package.nix new file mode 100644 index 000000000000..d7ae56cc5f00 --- /dev/null +++ b/pkgs/by-name/ok/okapi-ed/package.nix @@ -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 ]; + }; +})