diff options
author | Peter Hoeg <peter@speartail.com> | 2017-03-01 15:56:54 +0800 |
---|---|---|
committer | Peter Hoeg <peter@speartail.com> | 2017-03-06 10:57:12 +0800 |
commit | bb867aabd26ced5bf24a83afa5dcf111b20c9760 (patch) | |
tree | 9064979beca9447637fe5b1f5175c318c6a31375 /pkgs/tools/misc/grc | |
parent | 53a2baabbeb29ce0180b0353deb623139f1808bd (diff) | |
download | nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar.gz nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar.bz2 nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar.lz nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar.xz nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.tar.zst nixlib-bb867aabd26ced5bf24a83afa5dcf111b20c9760.zip |
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.
Diffstat (limited to 'pkgs/tools/misc/grc')
-rw-r--r-- | pkgs/tools/misc/grc/default.nix | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/pkgs/tools/misc/grc/default.nix b/pkgs/tools/misc/grc/default.nix index 452b6c981ff9..5fcde9bdaeb7 100644 --- a/pkgs/tools/misc/grc/default.nix +++ b/pkgs/tools/misc/grc/default.nix @@ -1,19 +1,30 @@ -{ stdenv, fetchurl, python }: +{ stdenv, fetchFromGitHub, python3Packages, makeWrapper }: stdenv.mkDerivation rec { - version = "1.9"; name = "grc-${version}"; + version = "1.10.1"; - src = fetchurl { - url = "http://korpus.juls.savba.sk/~garabik/software/grc/grc_${version}.orig.tar.gz"; - sha256 = "0nsgqpijhpinnzscmpnhcjahv8yivz0g65h8zsly2md23ibnwqj1"; + src = fetchFromGitHub { + owner = "garabik"; + repo = "grc"; + rev = "v${version}"; + sha256 = "1c2ndnbyznb608h3s99fbcyh4qb1ccipxm15lyszrrks0w2llbah"; }; + buildInputs = with python3Packages; [ wrapPython makeWrapper ]; + installPhase = '' - sed -i s%/usr%% install.sh - sed -i "s% /usr/bin/python%${python}/bin/python%" grc - sed -i "s% /usr/bin/python%${python}/bin/python%" grc - ./install.sh "$out" + ./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; { |