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";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "0.6.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-16 17:23:12 +00:00
|
|
|
owner = "tummychow";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "git-absorb";
|
2022-06-16 17:23:12 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-7Y/gEym+29lTwJ7FbuvOqzbiMSzrY9f5IPhtvIJUKbU=";
|
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
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
cargoHash = "sha256-Y/0In33y4mVTaE9yoBZ/3tRWcsSKgGjTCSHdjScNEj0=";
|
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 ];
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ tomfitzhenry ];
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "git-absorb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|