diff options
author | Peter Hoeg <peter@hoeg.com> | 2019-08-07 12:06:17 +0800 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2019-08-13 04:19:30 +0800 |
commit | 10cc136ed12c120506a446572c26218f38f23f1a (patch) | |
tree | 14dd89b4ced046ea23016a8367f5e7b5ae70bb5c /pkgs/tools/misc/grc | |
parent | ac95de0d2ea8d1fd8f5bb972459d1c62fcf2a74f (diff) |
grc: leave /etc/grc.conf alone so we can override it
plus a few minor cleanups
Diffstat (limited to 'pkgs/tools/misc/grc')
-rw-r--r-- | pkgs/tools/misc/grc/default.nix | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/pkgs/tools/misc/grc/default.nix b/pkgs/tools/misc/grc/default.nix index 451828b0f47bd..828d4e4dab783 100644 --- a/pkgs/tools/misc/grc/default.nix +++ b/pkgs/tools/misc/grc/default.nix @@ -1,8 +1,9 @@ -{ stdenv, fetchFromGitHub, python3Packages, makeWrapper }: +{ stdenv, fetchFromGitHub, python3Packages }: -stdenv.mkDerivation rec { - name = "grc-${version}"; +python3Packages.buildPythonApplication rec { + pname = "grc"; version = "1.11.3"; + format = "other"; src = fetchFromGitHub { owner = "garabik"; @@ -11,22 +12,18 @@ stdenv.mkDerivation rec { sha256 = "0b3wx9zr7l642hizk93ysbdss7rfymn22b2ykj4kpkf1agjkbv35"; }; - buildInputs = with python3Packages; [ wrapPython makeWrapper ]; + postPatch = '' + for f in grc grcat; do + substituteInPlace $f \ + --replace /usr/local/ $out/ + done + ''; installPhase = '' runHook preInstall ./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 + install -Dm444 -t $out/share/zsh/vendor-completions _grc runHook postInstall ''; |