1 { lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles }:
3 rustPlatform.buildRustPackage rec {
7 src = fetchFromGitHub {
10 rev = "refs/tags/${version}";
11 hash = "sha256-7Y/gEym+29lTwJ7FbuvOqzbiMSzrY9f5IPhtvIJUKbU=";
14 nativeBuildInputs = [ installShellFiles ];
16 cargoHash = "sha256-Y/0In33y4mVTaE9yoBZ/3tRWcsSKgGjTCSHdjScNEj0=";
19 installManPage Documentation/git-absorb.1
20 '' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
21 installShellCompletion --cmd git-absorb \
22 --bash <($out/bin/git-absorb --gen-completions bash) \
23 --fish <($out/bin/git-absorb --gen-completions fish) \
24 --zsh <($out/bin/git-absorb --gen-completions zsh)
28 homepage = "https://github.com/tummychow/git-absorb";
29 description = "git commit --fixup, but automatic";
30 license = [ licenses.bsd3 ];
31 maintainers = with maintainers; [ tomfitzhenry ];
32 mainProgram = "git-absorb";