hub: Replace git references

Hub fetches git from the environment by default.
This can lead to hub installations without git available, which makes little sense.
The change replaces the references with fully-qualified calls to git
This commit is contained in:
Tim Steinbach 2020-12-29 11:12:03 -05:00 committed by Tim Steinbach
parent a460b167f4
commit 0576111e8a
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, util-linux }:
{ stdenv, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux }:
buildGoPackage rec {
pname = "hub";
@ -20,6 +20,8 @@ buildGoPackage rec {
postPatch = ''
patchShebangs .
substituteInPlace git/git.go --replace "cmd.New(\"git\")" "cmd.New(\"${git}/bin/git\")"
substituteInPlace commands/args.go --replace "Executable: \"git\"" "Executable: \"${git}/bin/git\""
'';
postInstall = ''