nixpkgs/pkgs/tools/misc/grc/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
1.2 KiB
Nix
Raw Normal View History

2022-01-04 21:47:15 +00:00
{ lib
, fetchFromGitHub
, buildPythonApplication
2022-11-10 07:37:59 +00:00
, installShellFiles
2022-01-04 21:47:15 +00:00
}:
2013-07-31 04:11:31 +00:00
2021-03-02 20:20:01 +00:00
buildPythonApplication rec {
pname = "grc";
2021-08-08 13:03:21 +00:00
version = "1.13";
format = "other";
2013-07-31 04:11:31 +00:00
src = fetchFromGitHub {
2021-03-02 20:20:01 +00:00
owner = "garabik";
repo = pname;
rev = "v${version}";
2021-08-08 13:03:21 +00:00
sha256 = "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl";
2013-07-31 04:11:31 +00:00
};
postPatch = ''
for f in grc grcat; do
substituteInPlace $f \
--replace /usr/local/ $out/
done
# Support for absolute store paths.
substituteInPlace grc.conf \
--replace "^([/\w\.]+\/)" "^([/\w\.\-]+\/)"
'';
2022-11-10 07:37:59 +00:00
nativeBuildInputs = [ installShellFiles ];
2013-07-31 04:11:31 +00:00
installPhase = ''
2017-04-26 14:44:57 +00:00
runHook preInstall
2022-11-10 07:37:59 +00:00
./install.sh "$out" "$out"
2022-11-10 07:37:59 +00:00
installShellCompletion --zsh --name _grc _grc
2017-04-26 14:44:57 +00:00
runHook postInstall
2013-07-31 04:11:31 +00:00
'';
meta = with lib; {
2022-01-04 21:47:15 +00:00
homepage = "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html";
2021-03-02 20:20:01 +00:00
description = "Generic text colouriser";
2013-07-31 04:11:31 +00:00
longDescription = ''
Generic Colouriser is yet another colouriser (written in Python) for
beautifying your logfiles or output of commands.
'';
2021-03-02 20:20:01 +00:00
license = licenses.gpl2Plus;
2023-09-21 21:42:38 +00:00
maintainers = with maintainers; [ azahi lovek323 AndersonTorres peterhoeg ];
2021-03-02 20:20:01 +00:00
platforms = platforms.unix;
2023-11-09 09:36:02 +00:00
mainProgram = "grc";
2013-07-31 04:11:31 +00:00
};
}