mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-12 03:56:17 +03:00
Merge pull request #66248 from peterhoeg/f/grc
grc: leave /etc/grc.conf alone so we can override it
This commit is contained in:
commit
de20ba7ede
@ -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
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user