mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
54 lines
1.2 KiB
Nix
54 lines
1.2 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
|
|
|
|
# Support for absolute store paths.
|
|
substituteInPlace grc.conf \
|
|
--replace "^([/\w\.]+\/)" "^([/\w\.\-]+\/)"
|
|
'';
|
|
|
|
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 = "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; [ azahi lovek323 AndersonTorres peterhoeg ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "grc";
|
|
};
|
|
}
|