summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-and-tools/git-recent/default.nix
blob: 99b64e012eae368e5dab387a2c6ebba5dd75a1a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{stdenv, git, less, fetchFromGitHub, makeWrapper
# utillinuxMinimal is included because we need the column command
, utillinux
}:

stdenv.mkDerivation rec {
  pname = "git-recent";
  version = "1.1.1";

  src = fetchFromGitHub {
    owner = "paulirish";
    repo = "git-recent";
    rev = "v${version}";
    sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
  };

  buildInputs = [ makeWrapper ];

  buildPhase = null;

  installPhase = ''
    mkdir -p $out/bin
    cp git-recent $out/bin
    wrapProgram $out/bin/git-recent \
      --prefix PATH : "${stdenv.lib.makeBinPath [ git less utillinux ]}"
  '';

  meta = with stdenv.lib; {
    homepage = "https://github.com/paulirish/git-recent";
    description = "See your latest local git branches, formatted real fancy";
    license = licenses.mit;
    platforms = platforms.all;
    maintainers = [ maintainers.jlesquembre ];
  };
}