3
0
Fork 0
forked from mirrors/nixpkgs

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

View file

@ -1,4 +1,4 @@
{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, util-linux }: { stdenv, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux }:
buildGoPackage rec { buildGoPackage rec {
pname = "hub"; pname = "hub";
@ -20,6 +20,8 @@ buildGoPackage rec {
postPatch = '' postPatch = ''
patchShebangs . 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 = '' postInstall = ''