about summary refs log tree commit diff
path: root/pkgs/tools/text/teip/default.nix
blob: 14e1914dea8fe6f5e48f487fed0faeb47133087b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, rustPlatform, fetchCrate, installShellFiles, perl }:

rustPlatform.buildRustPackage rec {
  pname = "teip";
  version = "2.0.0";

  src = fetchCrate {
    inherit pname version;
    sha256 = "sha256-fME+tS8wcC6mk5FjuDJpFWWhIsiXV4kuybSqj9awFUM=";
  };

  cargoSha256 = "sha256-wrfS+OEYF60nOhtrnmk7HKqVuAJQFaiT0GM+3OoZ3Wk=";

  nativeBuildInputs = [ installShellFiles ];

  nativeCheckInputs = [ perl ];

  postInstall = ''
    installManPage man/teip.1
    installShellCompletion --zsh completion/zsh/_teip
  '';

  meta = with lib; {
    description = "A tool to bypass a partial range of standard input to any command";
    homepage = "https://github.com/greymd/teip";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}