1{ lib, stdenv, fetchFromGitHub, makeWrapper, getopt, git, coreutils }:
2
3stdenv.mkDerivation rec {
4 pname = "gitflow";
5 version = "1.12.3";
6
7 src = fetchFromGitHub {
8 owner = "petervanderdoes";
9 repo = pname;
10 rev = version;
11 sha256 = "sha256-kHirHG/bfsU6tKyQ0khNSTyChhzHfzib+HyA3LOtBI8=";
12 };
13
14 nativeBuildInputs = [ makeWrapper ];
15
16 preBuild = ''
17 makeFlagsArray+=(prefix="$out")
18 '';
19
20 postInstall = ''
21 wrapProgram $out/bin/git-flow \
22 --set FLAGS_GETOPT_CMD ${getopt}/bin/getopt \
23 --suffix PATH : ${git}/bin \
24 --prefix PATH : ${coreutils}/bin
25 '';
26
27 meta = with lib; {
28 homepage = "https://github.com/petervanderdoes/gitflow";
29 description = "Extend git with the Gitflow branching model";
30 mainProgram = "git-flow";
31 longDescription = ''
32 A set of scripts that provide high-level repository operations
33 for managing feature/release/hotfix branches in a Git repository,
34 particularly suited to be utilised to follow Vincent Driessen's
35 branching model.
36 '';
37 license = licenses.bsd2;
38 platforms = platforms.all;
39 maintainers = with maintainers; [ offline ];
40 };
41}