lol
at 18.03-beta 46 lines 1.4 kB view raw
1{ stdenv, fetchFromGitHub, python3Packages, makeWrapper }: 2 3stdenv.mkDerivation rec { 4 name = "grc-${version}"; 5 version = "1.11.1"; 6 7 src = fetchFromGitHub { 8 owner = "garabik"; 9 repo = "grc"; 10 rev = "v${version}"; 11 sha256 = "10h65qmv2cymixzfsckfcn6f01xsjzfq1x303rv01nibniwbq5z9"; 12 }; 13 14 buildInputs = with python3Packages; [ wrapPython makeWrapper ]; 15 16 installPhase = '' 17 runHook preInstall 18 19 ./install.sh "$out" "$out" 20 21 for f in $out/bin/* ; do 22 patchPythonScript $f 23 substituteInPlace $f \ 24 --replace ' /usr/bin/env python3' '${python3Packages.python.interpreter}' \ 25 --replace "'/etc/grc.conf'" "'$out/etc/grc.conf'" \ 26 --replace "'/usr/share/grc/'" "'$out/share/grc/'" 27 wrapProgram $f \ 28 --prefix PATH : $out/bin 29 done 30 31 runHook postInstall 32 ''; 33 34 meta = with stdenv.lib; { 35 description = "Yet another colouriser for beautifying your logfiles or output of commands"; 36 homepage = http://korpus.juls.savba.sk/~garabik/software/grc.html; 37 license = licenses.gpl2; 38 maintainers = with maintainers; [ lovek323 AndersonTorres peterhoeg ]; 39 platforms = platforms.unix; 40 41 longDescription = '' 42 Generic Colouriser is yet another colouriser (written in Python) for 43 beautifying your logfiles or output of commands. 44 ''; 45 }; 46}