From 0576111e8ae62ae19cc5b1908e87bd3e34a22bc0 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Tue, 29 Dec 2020 11:12:03 -0500 Subject: [PATCH] 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 --- .../version-management/git-and-tools/hub/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 = ''