2021-01-11 07:54:33 +00:00
|
|
|
{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
|
2020-11-24 15:29:28 +00:00
|
|
|
# util-linuxMinimal is included because we need the column command
|
|
|
|
, util-linux
|
2017-04-16 16:12:53 +01:00
|
|
|
}:
|
|
|
|
|
2018-05-03 06:58:11 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-06-30 10:41:06 +01:00
|
|
|
pname = "git-recent";
|
|
|
|
version = "1.1.1";
|
2017-04-16 16:12:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "paulirish";
|
|
|
|
repo = "git-recent";
|
|
|
|
rev = "v${version}";
|
2019-06-30 10:41:06 +01:00
|
|
|
sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
|
2017-04-16 16:12:53 +01:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2017-04-16 16:12:53 +01:00
|
|
|
|
|
|
|
buildPhase = null;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp git-recent $out/bin
|
|
|
|
wrapProgram $out/bin/git-recent \
|
2021-01-15 13:21:58 +00:00
|
|
|
--prefix PATH : "${lib.makeBinPath [ git less util-linux ]}"
|
2017-04-16 16:12:53 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/paulirish/git-recent";
|
2017-04-16 16:12:53 +01:00
|
|
|
description = "See your latest local git branches, formatted real fancy";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.jlesquembre ];
|
|
|
|
};
|
|
|
|
}
|