1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 makeWrapper,
6 git,
7 fzf,
8}:
9
10stdenvNoCC.mkDerivation (finalAttrs: {
11 pname = "git-toolbelt";
12 version = "1.9.3";
13
14 src = fetchFromGitHub {
15 owner = "nvie";
16 repo = "git-toolbelt";
17 rev = "v${finalAttrs.version}";
18 hash = "sha256-ANqv/iIDUyy2G4pKSw+2sutMEA0WhPN3OKfPTm5lwDU=";
19 };
20
21 nativeBuildInputs = [ makeWrapper ];
22
23 buildInputs = [
24 git
25 fzf # needed by git-fixup-with
26 ];
27
28 installPhase = ''
29 runHook preInstall
30
31 install -Dm755 git-* -t "$out"/bin
32
33 for exe in "$out"/bin/*; do
34 wrapProgram "$exe" \
35 --prefix PATH : "$out"/bin:${lib.makeBinPath finalAttrs.buildInputs}
36 done
37
38 runHook postInstall
39 '';
40
41 meta = {
42 changelog = "https://github.com/nvie/git-toolbelt/blob/${finalAttrs.src.rev}/CHANGELOG.md";
43 description = "Suite of useful Git commands that aid with scripting or every day command line usage";
44 homepage = "https://github.com/nvie/git-toolbelt";
45 license = lib.licenses.bsd3;
46 maintainers = with lib.maintainers; [ tomasajt ];
47 platforms = lib.platforms.all;
48 };
49})