mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-01 11:22:58 +00:00
2627f7d446
Diff: https://github.com/greymd/teip/compare/v2.0.0...v2.3.0 Changelog: https://github.com/greymd/teip/releases/tag/v2.3.0
52 lines
1.2 KiB
Nix
52 lines
1.2 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, perl
|
|
, stdenv
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "teip";
|
|
version = "2.3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "greymd";
|
|
repo = "teip";
|
|
rev = "v${version}";
|
|
hash = "sha256-09IKAM1ha40CvF5hdQIlUab7EBBFourC70LAagrs5+4=";
|
|
};
|
|
|
|
cargoHash = "sha256-cBFczgvLja6upuPnXphG2d9Rf1ZpNAVh16NHAHfXxHg=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
nativeCheckInputs = [ perl ];
|
|
|
|
# Cargo.lock is outdated
|
|
preConfigure = ''
|
|
cargo update --offline
|
|
'';
|
|
|
|
# tests are locale sensitive
|
|
preCheck = ''
|
|
export LANG=${if stdenv.isDarwin then "en_US.UTF-8" else "C.UTF-8"}
|
|
'';
|
|
|
|
postInstall = ''
|
|
installManPage man/teip.1
|
|
installShellCompletion \
|
|
--bash completion/bash/teip \
|
|
--fish completion/fish/teip.fish \
|
|
--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";
|
|
changelog = "https://github.com/greymd/teip/releases/tag/v${version}";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
};
|
|
}
|