2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, Security
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2022-03-05 16:20:37 +00:00
|
|
|
, igrep
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "igrep";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "1.1.0";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "konradsz";
|
|
|
|
repo = "igrep";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
sha256 = "sha256-g6DY3+HwBNQ+jxByXyTJK5CjAaC48FpmsDf1qGGO/Lk=";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
cargoHash = "sha256-7cSUIwWyWPxFDuRWplidbI93zbBV84T7e4Q//Uwj6N4=";
|
2022-03-05 16:20:37 +00:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
passthru.tests = {
|
2022-04-27 09:35:20 +00:00
|
|
|
version = testers.testVersion { package = igrep; command = "ig --version"; };
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive Grep";
|
|
|
|
homepage = "https://github.com/konradsz/igrep";
|
2022-03-10 19:12:11 +00:00
|
|
|
changelog = "https://github.com/konradsz/igrep/blob/v${version}/CHANGELOG.md";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ _0x4A6F ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "ig";
|
2022-03-05 16:20:37 +00:00
|
|
|
};
|
|
|
|
}
|