1{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
2# util-linuxMinimal is included because we need the column command
3, util-linux
4}:
5
6stdenv.mkDerivation rec {
7 pname = "git-recent";
8 version = "1.1.1";
9
10 src = fetchFromGitHub {
11 owner = "paulirish";
12 repo = "git-recent";
13 rev = "v${version}";
14 sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
15 };
16
17 nativeBuildInputs = [ makeWrapper ];
18
19 buildPhase = null;
20
21 installPhase = ''
22 mkdir -p $out/bin
23 cp git-recent $out/bin
24 wrapProgram $out/bin/git-recent \
25 --prefix PATH : "${lib.makeBinPath [ git less util-linux ]}"
26 '';
27
28 meta = with lib; {
29 homepage = "https://github.com/paulirish/git-recent";
30 description = "See your latest local git branches, formatted real fancy";
31 license = licenses.mit;
32 platforms = platforms.all;
33 maintainers = [ maintainers.jlesquembre ];
34 };
35}