about summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools
diff options
context:
space:
mode:
authorTim Steinbach <tim@nequissimus.com>2020-12-29 11:12:03 -0500
committerTim Steinbach <NeQuissimus@users.noreply.github.com>2021-01-02 15:43:01 -0500
commit0576111e8ae62ae19cc5b1908e87bd3e34a22bc0 (patch)
treed02ecd53db9f621b5ea39b5b059ae4e5adaa8717 /pkgs/applications/version-management/git-and-tools
parenta460b167f4ef3646341a8dc59195e5bac945ea77 (diff)
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
Diffstat (limited to 'pkgs/applications/version-management/git-and-tools')
-rw-r--r--pkgs/applications/version-management/git-and-tools/hub/default.nix4
1 files changed, 3 insertions, 1 deletions
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 be81364279710..1fc729783d022 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 = ''