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