nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 python3Packages,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8python3Packages.buildPythonApplication rec {
9 pname = "grc";
10 version = "1.13";
11 pyproject = false;
12
13 src = fetchFromGitHub {
14 owner = "garabik";
15 repo = "grc";
16 rev = "v${version}";
17 sha256 = "1h0h88h484a9796hai0wasi1xmjxxhpyxgixn6fgdyc5h69gv8nl";
18 };
19
20 postPatch = ''
21 for f in grc grcat; do
22 substituteInPlace $f \
23 --replace /usr/local/ $out/
24 done
25
26 # Support for absolute store paths.
27 substituteInPlace grc.conf \
28 --replace "^([/\w\.]+\/)" "^([/\w\.\-]+\/)"
29 '';
30
31 nativeBuildInputs = [ installShellFiles ];
32
33 installPhase = ''
34 runHook preInstall
35
36 ./install.sh "$out" "$out"
37 installShellCompletion --zsh --name _grc _grc
38
39 runHook postInstall
40 '';
41
42 outputs = [
43 "out"
44 "man"
45 ];
46
47 meta = {
48 homepage = "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html";
49 description = "Generic text colouriser";
50 longDescription = ''
51 Generic Colouriser is yet another colouriser (written in Python) for
52 beautifying your logfiles or output of commands.
53 '';
54 license = lib.licenses.gpl2Plus;
55 maintainers = with lib.maintainers; [
56 azahi
57 lovek323
58 peterhoeg
59 ];
60 platforms = lib.platforms.unix;
61 mainProgram = "grc";
62 };
63}