biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / tools / text / teip / default.nix
blobab140f2a578c35e04f93ab834bc55c0dd358f66e
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , installShellFiles
5 , perl
6 , stdenv
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "teip";
11   version = "2.3.0";
13   src = fetchFromGitHub {
14     owner = "greymd";
15     repo = "teip";
16     rev = "v${version}";
17     hash = "sha256-09IKAM1ha40CvF5hdQIlUab7EBBFourC70LAagrs5+4=";
18   };
20   cargoHash = "sha256-cBFczgvLja6upuPnXphG2d9Rf1ZpNAVh16NHAHfXxHg=";
22   nativeBuildInputs = [ installShellFiles ];
24   nativeCheckInputs = [ perl ];
26   # tests are locale sensitive
27   preCheck = ''
28     export LANG=${if stdenv.hostPlatform.isDarwin then "en_US.UTF-8" else "C.UTF-8"}
29   '';
31   postInstall = ''
32     installManPage man/teip.1
33     installShellCompletion \
34       --bash completion/bash/teip \
35       --fish completion/fish/teip.fish \
36       --zsh completion/zsh/_teip
37   '';
39   meta = with lib; {
40     description = "Tool to bypass a partial range of standard input to any command";
41     mainProgram = "teip";
42     homepage = "https://github.com/greymd/teip";
43     changelog = "https://github.com/greymd/teip/releases/tag/v${version}";
44     license = licenses.mit;
45     maintainers = with maintainers; [ figsoda ];
46   };