1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-23 06:01:15 +00:00
nixpkgs/pkgs/tools/misc/grc/default.nix
Peter Hoeg bb867aabd2 grc: 1.9 -> 1.10.1
Additionally, grc wasn't actually working unless you copied out the config files
to your home directory because it couldn't find the default config in
/etc/grc.conf

So now we patch the program to look in the right places.

Upstream has moved to github.
2017-03-06 10:57:12 +08:00

43 lines
1.3 KiB
Nix

{ stdenv, fetchFromGitHub, python3Packages, makeWrapper }:
stdenv.mkDerivation rec {
name = "grc-${version}";
version = "1.10.1";
src = fetchFromGitHub {
owner = "garabik";
repo = "grc";
rev = "v${version}";
sha256 = "1c2ndnbyznb608h3s99fbcyh4qb1ccipxm15lyszrrks0w2llbah";
};
buildInputs = with python3Packages; [ wrapPython makeWrapper ];
installPhase = ''
./install.sh "$out" "$out"
for f in $out/bin/* ; do
patchPythonScript $f
substituteInPlace $f \
--replace ' /usr/bin/env python3' '${python3Packages.python.interpreter}' \
--replace "'/etc/grc.conf'" "'$out/etc/grc.conf'" \
--replace "'/usr/share/grc/'" "'$out/share/grc/'"
wrapProgram $f \
--prefix PATH : $out/bin
done
'';
meta = with stdenv.lib; {
description = "Yet another colouriser for beautifying your logfiles or output of commands";
homepage = http://korpus.juls.savba.sk/~garabik/software/grc.html;
license = licenses.gpl2;
maintainers = with maintainers; [ lovek323 AndersonTorres ];
platforms = platforms.unix;
longDescription = ''
Generic Colouriser is yet another colouriser (written in Python) for
beautifying your logfiles or output of commands.
'';
};
}