2022-06-04 06:20:00 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, Security }:
|
2018-11-16 01:39:26 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-07-15 02:00:00 +02:00
|
|
|
pname = "git-absorb";
|
2023-11-28 05:20:00 +01:00
|
|
|
version = "0.6.11";
|
2018-11-16 01:39:26 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-04 06:20:00 +02:00
|
|
|
owner = "tummychow";
|
2023-11-28 05:20:00 +01:00
|
|
|
repo = "git-absorb";
|
2022-06-04 06:20:00 +02:00
|
|
|
rev = "refs/tags/${version}";
|
2023-11-28 05:20:00 +01:00
|
|
|
hash = "sha256-SYBJKnzv2oktWubgm/j6wEeoLSBjGqQVXQf9LOaq+NU=";
|
2018-11-16 01:39:26 +01:00
|
|
|
};
|
|
|
|
|
2020-05-15 07:00:00 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-06-04 06:20:00 +02:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ Security ];
|
2018-11-16 01:39:26 +01:00
|
|
|
|
2023-11-28 05:20:00 +01:00
|
|
|
cargoHash = "sha256-i2ntM7NTi+hiB7DxEEV+3SXV8sVVWcNanif/wUZ9XvI=";
|
2020-05-15 07:00:00 +02:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage Documentation/git-absorb.1
|
2022-06-04 06:20:00 +02: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 07:00:00 +02:00
|
|
|
'';
|
2018-11-16 01:39:26 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-15 02:00:00 +02:00
|
|
|
homepage = "https://github.com/tummychow/git-absorb";
|
2018-11-16 01:39:26 +01:00
|
|
|
description = "git commit --fixup, but automatic";
|
|
|
|
license = [ licenses.bsd3 ];
|
|
|
|
maintainers = [ maintainers.marsam ];
|
2023-11-27 02:17:53 +01:00
|
|
|
mainProgram = "git-absorb";
|
2018-11-16 01:39:26 +01:00
|
|
|
};
|
|
|
|
}
|