2023-04-29 16:46:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-12-03 08:41:04 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
2023-10-09 19:29:22 +00:00
|
|
|
, callPackage
|
2023-04-29 16:46:19 +00:00
|
|
|
, pkg-config
|
2020-12-03 08:41:04 +00:00
|
|
|
, pcre
|
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2020-12-03 08:41:04 +00:00
|
|
|
pname = "ucg";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "unstable-2022-09-03";
|
2020-12-03 08:41:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gvansickle";
|
2023-04-29 16:46:19 +00:00
|
|
|
repo = "ucg";
|
|
|
|
rev = "cbb185e8adad6546b7e1c5e9ca59a81f98dca49f";
|
|
|
|
hash = "sha256-Osdyxp8DoEjcr2wQLCPqOQ2zQf/0JWYxaDpZB02ACWo=";
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
pcre
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.tests = {
|
|
|
|
simple = callPackage ./tests/simple.nix {
|
|
|
|
ucg = finalAttrs.finalPackage;
|
|
|
|
};
|
|
|
|
};
|
2020-12-03 08:41:04 +00:00
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://gvansickle.github.io/ucg/";
|
2020-12-03 08:41:04 +00:00
|
|
|
description = "Grep-like tool for searching large bodies of source code";
|
|
|
|
longDescription = ''
|
|
|
|
UniversalCodeGrep (ucg) is an extremely fast grep-like tool specialized
|
|
|
|
for searching large bodies of source code. It is intended to be largely
|
|
|
|
command-line compatible with Ack, to some extent with ag, and where
|
|
|
|
appropriate with grep. Search patterns are specified as PCRE regexes.
|
|
|
|
'';
|
2023-04-29 16:46:19 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "ucg";
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
broken = stdenv.isAarch64 || stdenv.isDarwin;
|
2020-12-03 08:41:04 +00:00
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|
2021-12-06 16:07:01 +00:00
|
|
|
# TODO: report upstream
|