gitAndTools.gitflow: fix runtime dependencies #25487

If `git-flow` was installed without explicitly installing `getopt` and `git`
too, it couldn't find those executables. Now it can find those and it can be
used as `git-flow` executable. Note, however, that in order to use `git-flow` as
git subcommand (`git flow`), one needs to install `git` too.
This commit is contained in:
Jaakko Luttinen 2017-05-06 09:05:23 +03:00
parent 399216c03a
commit dee8865d03
No known key found for this signature in database
GPG Key ID: 7B1CE13152E6B964

View File

@ -14,15 +14,16 @@ stdenv.mkDerivation rec {
sha256 = "1i8bwi83qcqvi8zrkjn4mp2v8v7y11fd520wpg2jgy5hqyz34chg";
};
buildInputs = optionals (stdenv.isDarwin) [ pkgs.makeWrapper ];
buildInputs = [ pkgs.makeWrapper ];
preBuild = ''
makeFlagsArray+=(prefix="$out")
'';
postInstall = optional (stdenv.isDarwin) ''
postInstall = ''
wrapProgram $out/bin/git-flow \
--set FLAGS_GETOPT_CMD ${pkgs.getopt}/bin/getopt
--set FLAGS_GETOPT_CMD ${pkgs.getopt}/bin/getopt \
--suffix PATH : ${pkgs.git}/bin
'';
meta = with stdenv.lib; {