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 longDescription = ''
31 A set of scripts that provide high-level repository operations
32 for managing feature/release/hotfix branches in a Git repository,
33 particularly suited to be utilised to follow Vincent Driessen's
34 branching model.
35 '';
36 license = licenses.bsd2;
37 platforms = platforms.all;
38 maintainers = with maintainers; [ offline ];
39 };
40}