depot/third_party/nixpkgs/pkgs/applications/version-management/git-absorb/default.nix
Default email 87f9c27ba9 Project import generated by Copybara.
GitOrigin-RevId: fe2ecaf706a5907b5e54d979fbde4924d84b65fc
2023-04-12 14:48:02 +02:00

34 lines
1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
rustPlatform.buildRustPackage rec {
pname = "git-absorb";
version = "0.6.10";
src = fetchFromGitHub {
owner = "tummychow";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-lFaiv9bgzu6XVcQuLXWoWsKl0cylfrF5rC0i3qj+zU0=";
};
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
cargoHash = "sha256-hksSyVdsGe/Ha3F5orL4W/k2nzFCuMqQjBgsT1jiWLw=";
postInstall = ''
installManPage Documentation/git-absorb.1
installShellCompletion --cmd git-absorb \
--bash <($out/bin/git-absorb --gen-completions bash) \
--fish <($out/bin/git-absorb --gen-completions fish) \
--zsh <($out/bin/git-absorb --gen-completions zsh)
'';
meta = with lib; {
homepage = "https://github.com/tummychow/git-absorb";
description = "git commit --fixup, but automatic";
license = [ licenses.bsd3 ];
maintainers = [ maintainers.marsam ];
};
}