Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 1.3 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonApplication, 5 installShellFiles, 6}: 7 8buildPythonApplication rec { 9 pname = "grc"; 10 version = "1.13"; 11 format = "other"; 12 13 src = fetchFromGitHub { 14 owner = "garabik"; 15 repo = pname; 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 meta = with lib; { 43 homepage = "http://kassiopeia.juls.savba.sk/~garabik/software/grc.html"; 44 description = "Generic text colouriser"; 45 longDescription = '' 46 Generic Colouriser is yet another colouriser (written in Python) for 47 beautifying your logfiles or output of commands. 48 ''; 49 license = licenses.gpl2Plus; 50 maintainers = with maintainers; [ 51 azahi 52 lovek323 53 peterhoeg 54 ]; 55 platforms = platforms.unix; 56 mainProgram = "grc"; 57 }; 58}