diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index be8136427971..1fc729783d02 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -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 = ''