2024-11-11 07:35:32 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles }:
|
2018-11-16 00:39:26 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-07-15 00:00:00 +00:00
|
|
|
pname = "git-absorb";
|
2024-07-08 02:01:02 +00:00
|
|
|
version = "0.6.15";
|
2018-11-16 00:39:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-06-04 04:20:00 +00:00
|
|
|
owner = "tummychow";
|
2023-11-28 04:20:00 +00:00
|
|
|
repo = "git-absorb";
|
2022-06-04 04:20:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-07-08 02:01:02 +00:00
|
|
|
hash = "sha256-7Y/gEym+29lTwJ7FbuvOqzbiMSzrY9f5IPhtvIJUKbU=";
|
2018-11-16 00:39:26 +00:00
|
|
|
};
|
|
|
|
|
2020-05-15 05:00:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-07-08 02:01:02 +00:00
|
|
|
cargoHash = "sha256-Y/0In33y4mVTaE9yoBZ/3tRWcsSKgGjTCSHdjScNEj0=";
|
2020-05-15 05:00:00 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage Documentation/git-absorb.1
|
2024-07-10 11:52:28 +00:00
|
|
|
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
2022-06-04 04:20:00 +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 05:00:00 +00:00
|
|
|
'';
|
2018-11-16 00:39:26 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-07-15 00:00:00 +00:00
|
|
|
homepage = "https://github.com/tummychow/git-absorb";
|
2018-11-16 00:39:26 +00:00
|
|
|
description = "git commit --fixup, but automatic";
|
|
|
|
license = [ licenses.bsd3 ];
|
2024-04-27 12:41:59 +00:00
|
|
|
maintainers = with maintainers; [ tomfitzhenry ];
|
2023-11-27 01:17:53 +00:00
|
|
|
mainProgram = "git-absorb";
|
2018-11-16 00:39:26 +00:00
|
|
|
};
|
|
|
|
}
|