depot/third_party/nixpkgs/pkgs/by-name/gi/git-toolbelt/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

49 lines
1.1 KiB
Nix

{
lib,
stdenvNoCC,
fetchFromGitHub,
makeWrapper,
git,
fzf,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "git-toolbelt";
version = "1.9.2";
src = fetchFromGitHub {
owner = "nvie";
repo = "git-toolbelt";
rev = "v${finalAttrs.version}";
hash = "sha256-0abO3AYpN6TKYFtrK9lP5k57qWI7ByumaO/5dgKDqQc=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
git
fzf # needed by git-fixup-with
];
installPhase = ''
runHook preInstall
install -Dm755 git-* -t "$out"/bin
for exe in "$out"/bin/*; do
wrapProgram "$exe" \
--prefix PATH : "$out"/bin:${lib.makeBinPath finalAttrs.buildInputs}
done
runHook postInstall
'';
meta = {
changelog = "https://github.com/nvie/git-toolbelt/blob/${finalAttrs.src.rev}/CHANGELOG.md";
description = "A suite of useful Git commands that aid with scripting or every day command line usage";
homepage = "https://github.com/nvie/git-toolbelt";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.all;
};
})