depot/third_party/nixpkgs/pkgs/tools/misc/grc/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

48 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, buildPythonApplication
, installShellFiles
}:
buildPythonApplication rec {
pname = "grc";
version = "1.13";
format = "other";
src = fetchFromGitHub {
owner = "garabik";
repo = pname;
rev = "v${version}";
sha256 = "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl";
};
postPatch = ''
for f in grc grcat; do
substituteInPlace $f \
--replace /usr/local/ $out/
done
'';
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
runHook preInstall
./install.sh "$out" "$out"
installShellCompletion --zsh --name _grc _grc
runHook postInstall
'';
meta = with lib; {
homepage = "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html";
description = "A generic text colouriser";
longDescription = ''
Generic Colouriser is yet another colouriser (written in Python) for
beautifying your logfiles or output of commands.
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lovek323 AndersonTorres peterhoeg ];
platforms = platforms.unix;
};
}