Unverified Commit 65e88f75 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

okapi-ed: init at 0.4.1 (#505206)

parents 1b4c0d34 24db1431
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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";
+42 −0
Original line number Diff line number Diff line
{
  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 ];
  };
})