git.iko.soy/typeable/nixpkgs
on master help sign in
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

commit0576111e8ae62ae19cc5b1908e87bd3e34a22bc0 authorTim Steinbach <tim@nequissimus.com> dateTue 29 Dec 2020, 11:12 (6 years ago) parenta460b16
1 file changed+3−1
pkgs/applications/version-management/git-and-tools/hub/default.nix+3−1
pkgs/applications/version-management/git-and-tools/hub/default.nix+3−1
@@ -1,4 +1,4 @@
1−{ stdenv, buildGoPackage, fetchFromGitHub, groff, installShellFiles, util-linux }:
1+{ stdenv, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, util-linux }:
22
33buildGoPackage rec {
44 pname = "hub";
@@ -20,6 +20,8 @@ buildGoPackage rec {
2020
2121 postPatch = ''
2222 patchShebangs .
23+ substituteInPlace git/git.go --replace "cmd.New(\"git\")" "cmd.New(\"${git}/bin/git\")"
24+ substituteInPlace commands/args.go --replace "Executable: \"git\"" "Executable: \"${git}/bin/git\""
2325 '';
2426
2527 postInstall = ''