2022-03-02 19:00:52 +01:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, stdenv
|
|
|
|
, Security
|
|
|
|
, testVersion
|
|
|
|
, igrep
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "igrep";
|
2022-03-04 17:08:41 +01:00
|
|
|
version = "0.2.0";
|
2022-03-02 19:00:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "konradsz";
|
|
|
|
repo = "igrep";
|
|
|
|
rev = "v${version}";
|
2022-03-04 17:08:41 +01:00
|
|
|
sha256 = "sha256-CH0wf9EhNnfi93W/4IJf6bPqU4pgw6Q9965Wjln9pso=";
|
2022-03-02 19:00:52 +01:00
|
|
|
};
|
|
|
|
|
2022-03-04 17:08:41 +01:00
|
|
|
cargoSha256 = "sha256-VnZuRLBt/Q+D89+jKm0rak+ID5oNbvN1k8or3pYzfIM=";
|
2022-03-02 19:00:52 +01:00
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
version = testVersion { package = igrep; command = "ig --version"; };
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Interactive Grep";
|
|
|
|
homepage = "https://github.com/konradsz/igrep";
|
2022-03-04 17:08:41 +01:00
|
|
|
changelog = "https://github.com/konradsz/igrep/blob/v${version}/CHANGELOG.md";
|
2022-03-02 19:00:52 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ _0x4A6F ];
|
|
|
|
};
|
|
|
|
}
|