depot/third_party/nixpkgs/pkgs/applications/version-management/git-recent/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

36 lines
931 B
Nix

{lib, stdenv, git, less, fetchFromGitHub, makeWrapper
# util-linuxMinimal is included because we need the column command
, util-linux
}:
stdenv.mkDerivation rec {
pname = "git-recent";
version = "1.1.1";
src = fetchFromGitHub {
owner = "paulirish";
repo = "git-recent";
rev = "v${version}";
sha256 = "1g8i6vpjnnfh7vc1269c91bap267w4bxdqqwnzb8x18vqgn2fx8i";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = null;
installPhase = ''
mkdir -p $out/bin
cp git-recent $out/bin
wrapProgram $out/bin/git-recent \
--prefix PATH : "${lib.makeBinPath [ git less util-linux ]}"
'';
meta = with 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 ];
mainProgram = "git-recent";
};
}