gitflow: tweak for darwin

On Darwin, wrap the git-flow binary and set:

    FLAGS_GETOPT_CMD=${getopt}/bin/getopt

Without this change, I was getting the following error:

    flags:ERROR short flag required for (showcommands) on this platform
This commit is contained in:
Eric Bailey 2017-02-28 05:52:25 -06:00
parent 52507b3a9b
commit ea07961294
No known key found for this signature in database
GPG Key ID: 29E1B8D32C1635C4

View File

@ -1,4 +1,6 @@
{ stdenv, fetchFromGitHub }: { pkgs, stdenv, fetchFromGitHub }:
with pkgs.lib;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "gitflow"; pname = "gitflow";
@ -12,10 +14,17 @@ stdenv.mkDerivation rec {
sha256 = "1i8bwi83qcqvi8zrkjn4mp2v8v7y11fd520wpg2jgy5hqyz34chg"; sha256 = "1i8bwi83qcqvi8zrkjn4mp2v8v7y11fd520wpg2jgy5hqyz34chg";
}; };
buildInputs = optionals (stdenv.isDarwin) [ pkgs.makeWrapper ];
preBuild = '' preBuild = ''
makeFlagsArray+=(prefix="$out") makeFlagsArray+=(prefix="$out")
''; '';
postInstall = optional (stdenv.isDarwin) ''
wrapProgram $out/bin/git-flow \
--set FLAGS_GETOPT_CMD ${pkgs.getopt}/bin/getopt
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/petervanderdoes/gitflow; homepage = https://github.com/petervanderdoes/gitflow;
description = "Extend git with the Gitflow branching model"; description = "Extend git with the Gitflow branching model";