nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 git,
5 less,
6 fetchFromGitHub,
7 makeWrapper,
8 # util-linuxMinimal is included because we need the column command
9 util-linux,
10}:
11
12stdenv.mkDerivation rec {
13 pname = "git-recent";
14 version = "2.0.4";
15
16 src = fetchFromGitHub {
17 owner = "paulirish";
18 repo = "git-recent";
19 rev = "v${version}";
20 sha256 = "sha256-b6AWLEXCOza+lIHlvyYs3M6yHGr2StYXzl7OsA9gv/k=";
21 };
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 buildPhase = null;
26
27 installPhase = ''
28 mkdir -p $out/bin
29 cp git-recent $out/bin
30 wrapProgram $out/bin/git-recent \
31 --prefix PATH : "${
32 lib.makeBinPath [
33 git
34 less
35 util-linux
36 ]
37 }"
38 '';
39
40 meta = with lib; {
41 homepage = "https://github.com/paulirish/git-recent";
42 description = "See your latest local git branches, formatted real fancy";
43 license = licenses.mit;
44 platforms = platforms.all;
45 maintainers = [ maintainers.jlesquembre ];
46 mainProgram = "git-recent";
47 };
48}