2022-06-16 17:23:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "git-absorb";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.6.9";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-16 17:23:12 +00:00
|
|
|
owner = "tummychow";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-z02bMJ+KQaLHqIzsdB3BCVzTQ0NRG0ylAfTHYgOxZYk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 21:57:56 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
cargoSha256 = "sha256-lP0fU2Cirta4WWha7Pgje537u6TbD5oiHLfamfzJtpU=";
|
2020-05-15 21:57:56 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage Documentation/git-absorb.1
|
2022-06-16 17:23:12 +00:00
|
|
|
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)
|
2020-05-15 21:57:56 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/tummychow/git-absorb";
|
|
|
|
description = "git commit --fixup, but automatic";
|
|
|
|
license = [ licenses.bsd3 ];
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|