2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
|
2020-11-24 20:58:05 +00:00
|
|
|
# util-linuxMinimal is included because we need the column command
|
|
|
|
, util-linux
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "git-recent";
|
|
|
|
version = "1.1.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paulirish";
|
|
|
|
repo = "git-recent";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
|
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPhase = null;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp git-recent $out/bin
|
|
|
|
wrapProgram $out/bin/git-recent \
|
2021-01-17 00:15:33 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git less util-linux ]}"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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 ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "git-recent";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|