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:
@@ -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";
|
||||||
|
|||||||
Reference in New Issue
Block a user